screenShield: Don't crash when trying to deactivate the shield
If the user has a lock delay, or deactivate() has been called at any other time, we need to check for the unlock dialog, as it may not always exist.
This commit is contained in:
parent
2ad9eafeaf
commit
eec4334a78
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user