From 96cd9bb387102c3f1e79b4e531264d853386140a Mon Sep 17 00:00:00 2001 From: jderose9 Date: Wed, 11 Oct 2017 21:30:03 -0400 Subject: [PATCH] null check for focus_app, fixed #224, #246 --- windowPreview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windowPreview.js b/windowPreview.js index 05eea99..9f35085 100644 --- a/windowPreview.js +++ b/windowPreview.js @@ -199,8 +199,8 @@ const thumbnailPreviewMenu = new Lang.Class({ this._hoverOpenTimeoutId = null; if (!this.isOpen && this._dtpSettings.get_boolean("show-window-previews")) { this.popup(); - let focusedApp = Shell.WindowTracker.get_default().focus_app.get_name(); - if (focusedApp === "Oracle VM VirtualBox") { + let focusedApp = Shell.WindowTracker.get_default().focus_app; + if (focusedApp && focusedApp.get_name() === "Oracle VM VirtualBox") { this.actor.grab_key_focus(); } }