From 84d2d3feb3cb4a1226a0bb22be9653f6555131a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 18 Apr 2018 08:08:54 +0200 Subject: [PATCH] keyboard: Check monitor validity before deferencing it Monitor could be invalid in headless mode. https://bugzilla.gnome.org/show_bug.cgi?id=788882 --- js/ui/keyboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 96da88781..3087cefa5 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1148,7 +1148,7 @@ var Keyboard = new Lang.Class({ let windowActor = window.get_compositor_private(); let delta = 0; - if (frameRect.y + y + h >= monitor.height - keyboardHeight) + if (monitor && frameRect.y + y + h >= monitor.height - keyboardHeight) delta = keyboardHeight; this._animateWindow(window, true, delta);