diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 752eeaad1..a6f825a7e 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -658,13 +658,15 @@ const ScreenShield = new Lang.Class({ _ensureUnlockDialog: function(onPrimary) { if (!this._dialog) { let constructor = Main.sessionMode.unlockDialog; - this._dialog = new constructor(this._lockDialogGroup); - if (!this._dialog) { + if (!constructor) { // This session mode has no locking capabilities this.unlock(); return; } + this._dialog = new constructor(this._lockDialogGroup); + + let time = global.get_current_time(); this._dialog.connect('loaded', Lang.bind(this, function() { if (!this._dialog.open(time, onPrimary)) {