diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 1c1dca6cf..32ef1ca9e 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -920,8 +920,10 @@ const ScreenShield = new Lang.Class({ this._lockScreenState = MessageTray.State.HIDDEN; this._lockScreenGroup.hide(); - this._dialog.actor.grab_key_focus(); - this._dialog.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); + if (this._dialog) { + this._dialog.actor.grab_key_focus(); + this._dialog.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); + } }, _hideLockScreen: function(animate, velocity) {