[gnome-shell] screenShield: Don't crash when trying to deactivate the shield
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenShield: Don't crash when trying to deactivate the shield
- Date: Tue, 6 Aug 2013 13:27:17 +0000 (UTC)
commit eec4334a781684bf58f12eb88c598e5e3d21c26a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 6 09:22:48 2013 -0400
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.
js/ui/screenShield.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 151f70b..38ac63e 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]