[gnome-shell/gnome-3-28] layoutManager: Return null monitor if focusIndex is invalid



commit 81db90833949de4c6999aaa506b10dd18772825d
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu Jun 28 14:51:48 2018 +0000

    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];
     },
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]