osdWindow: Don't tween to undefined

Check that we got a valid level before setting the level bar to it, to
prevent a Tweener warning.
This commit is contained in:
Jasper St. Pierre 2013-04-14 11:32:21 -04:00
parent 7051411be7
commit 7101cc3170

View File

@ -125,6 +125,7 @@ const OsdWindow = new Lang.Class({
setLevel: function(level) {
this._level.actor.visible = (level != undefined);
if (level) {
if (this.actor.visible)
Tweener.addTween(this._level,
{ level: level,
@ -132,6 +133,7 @@ const OsdWindow = new Lang.Class({
transition: 'easeOutQuad' });
else
this._level.level = level;
}
},
show: function() {