diff --git a/js/ui/appIcon.js b/js/ui/appIcon.js index d7dbd7726..760971e20 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) {