diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 689ded035..6b631d1d9 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -384,9 +384,8 @@ const WorkspaceThumbnail = new Lang.Class({ }, destroy : function() { - this.actor.destroy(); - this._bgManager.destroy(); - this._bgManager = null; + if (this.actor) + this.actor.destroy(); }, workspaceRemoved : function() { @@ -407,6 +406,11 @@ const WorkspaceThumbnail = new Lang.Class({ _onDestroy: function(actor) { this.workspaceRemoved(); + if (this._bgManager) { + this._bgManager.destroy(); + this._bgManager = null; + } + this._windows = []; this.actor = null; },