From 996dd74157248e78e3d039f2e68e70d366244aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 28 Jun 2018 16:51:48 +0200 Subject: [PATCH] layoutManager: Return null monitor if focusIndex is invalid https://bugzilla.gnome.org/show_bug.cgi?id=788882 --- js/ui/layout.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/ui/layout.js b/js/ui/layout.js index 6f810395d..dcffe479c 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -557,6 +557,8 @@ var LayoutManager = new Lang.Class({ }, get focusMonitor() { + if (this.focusIndex < 0) + return null; return this.monitors[this.focusIndex]; },