[gnome-shell-extensions/gnome-3-0] Fix a local null pointer dereference and a return causing a null pointer dereference in the caller w
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/gnome-3-0] Fix a local null pointer dereference and a return causing a null pointer dereference in the caller w
- Date: Thu, 1 Dec 2011 16:20:38 +0000 (UTC)
commit 825903f8fc30d75a49428a04ea57fbdc8978331a
Author: Lance <windchine gmail com>
Date: Sat Nov 26 07:33:02 2011 +0000
Fix a local null pointer dereference and a return causing a null pointer dereference in the caller when alt-tab used with no windows open in any workspace in the current gnome-shell session.
https://bugzilla.gnome.org/show_bug.cgi?id=663064
https://bugzilla.gnome.org/show_bug.cgi?id=664409
extensions/alternate-tab/extension.js | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/extensions/alternate-tab/extension.js b/extensions/alternate-tab/extension.js
index 0e158c4..8ae0d5c 100644
--- a/extensions/alternate-tab/extension.js
+++ b/extensions/alternate-tab/extension.js
@@ -60,8 +60,11 @@ AltTabPopup2.prototype = {
}
normal_windows.sort(Lang.bind(this, this._sortWindows));
- let win_on_top = normal_windows.shift();
- normal_windows.push(win_on_top);
+ if(normal_windows.length) {
+ let win_on_top = normal_windows.shift();
+ normal_windows.push(win_on_top);
+ }
+
windows = normal_windows;
for (let w = 0; w < windows.length; w++) {
let win = windows[w];
@@ -78,8 +81,10 @@ AltTabPopup2.prototype = {
appIcons.push(ap1);
}
- if (!windows.length)
+ if (!windows.length) {
+ this.destroy();
return false;
+ }
if (!Main.pushModal(this.actor))
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]