windowsNavigator: only access tooltip if it's known to exist

Apparently, windowOverlay._text can be null sometimes. In that
case, do nothing instead of crashing.
This commit is contained in:
Giovanni Campagna
2012-04-26 22:50:11 +02:00
parent 5ca9f35a95
commit e1c1fc73e2
+2 -2
View File
@@ -34,7 +34,7 @@ function enable() {
resetState();
Workspace.WindowOverlay.prototype.setId = function(id) {
if (this._text.visible && id == null)
if (this._text && this._text.visible && id == null)
this._text.hide();
this._id = id;
if (id != null)
@@ -57,7 +57,7 @@ function enable() {
winInjections['showTooltip'] = undefined;
Workspace.WindowOverlay.prototype.hideTooltip = function() {
if (this._text.visible)
if (this._text && this._text.visible)
this._text.hide();
}
winInjections['hideTooltip'] = undefined;