[gnome-shell] Fix exception when showing menu for not-running app
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix exception when showing menu for not-running app
- Date: Tue, 6 Oct 2009 21:19:07 +0000 (UTC)
commit 90ebcd32e37f10b365d4c02989ce18868598ed66
Author: Colin Walters <walters verbum org>
Date: Mon Oct 5 16:01:40 2009 -0400
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
js/ui/appIcon.js | 2 +-
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]