summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2009-10-05 20:01:40 (GMT)
committerColin Walters <walters@verbum.org>2009-10-06 21:19:36 (GMT)
commit90ebcd32e37f10b365d4c02989ce18868598ed66 (patch)
tree8c4934a8f2eb407bec5778d8c95c9e1d79387c36
parent53d058137723ef352675d2ea83b1c824e3dfaa97 (diff)
downloadgnome-shell-90ebcd32e37f10b365d4c02989ce18868598ed66.tar.gz
gnome-shell-90ebcd32e37f10b365d4c02989ce18868598ed66.tar.xz
Fix exception when showing menu for not-running app
Need to check windows.length before checking first window. https://bugzilla.gnome.org/show_bug.cgi?id=597466
-rw-r--r--js/ui/appIcon.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/ui/appIcon.js b/js/ui/appIcon.js
index d7dbd77..760971e 100644
--- a/js/ui/appIcon.js
+++ b/js/ui/appIcon.js
@@ -440,7 +440,7 @@ AppIconMenu.prototype = {
// Display the app windows menu items and the separator between windows
// of the current desktop and other windows.
let activeWorkspace = global.screen.get_active_workspace();
- let separatorShown = windows[0].get_workspace() != activeWorkspace;
+ let separatorShown = windows.length > 0 && windows[0].get_workspace() != activeWorkspace;
for (let i = 0; i < windows.length; i++) {
if (!separatorShown && windows[i].get_workspace() != activeWorkspace) {