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