diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 151f70b4c..38ac63e7f 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -1123,9 +1123,12 @@ const ScreenShield = new Lang.Class({ }, deactivate: function(animate) { - this._dialog.finish(Lang.bind(this, function() { + if (this._dialog) + this._dialog.finish(Lang.bind(this, function() { + this._finishDeactivate(animate); + })); + else this._finishDeactivate(animate); - })); }, _finishDeactivate: function(animate) {