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).
This commit is contained in:
Giovanni Campagna
2011-11-18 18:51:59 +01:00
parent c6624e84b3
commit afa8ccd07f
+3 -1
View File
@@ -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