From afa8ccd07fde8fa1581ec45551ad67d192c3c912 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Fri, 18 Nov 2011 18:51:59 +0100 Subject: [PATCH] alternate-tab: destroy the object if there is no window We cannot return from show() without creating an AppSwitcher, as it will subsequently crash in core shell code due to _appSwitcher being null. We can prevent this by destroying the actor (which will prevent it from being allocated and thus avoid the crash). --- extensions/alternate-tab/extension.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/alternate-tab/extension.js b/extensions/alternate-tab/extension.js index 6956ce2d..68b27e94 100644 --- a/extensions/alternate-tab/extension.js +++ b/extensions/alternate-tab/extension.js @@ -403,8 +403,10 @@ AltTabPopup2.prototype = { } } - if (!windows.length) + if (!windows.length) { + this.destroy(); return false; + } if (!Main.pushModal(this.actor)) { // Probably someone else has a pointer grab, try again with keyboard only