[gnome-shell/gbsneto/double-check-authprompt] unlockDialog: Only cancel AuthPrompt if it exists



commit 58f6170f62004bed4a8087e270065d7cbe27d34c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Mar 27 20:35:36 2020 -0300

    unlockDialog: Only cancel AuthPrompt if it exists
    
    AuthPrompt is created on demand, and this._authPrompt is
    expected to be null except on very strictly controlled
    occasions. The idle monitor callback isn't one of them.
    
    Check if AuthPrompt exists before cancelling it.
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2371

 js/ui/unlockDialog.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index d27b1d59ca..2170f12a76 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -761,7 +761,7 @@ var UnlockDialog = GObject.registerClass({
     }
 
     _escape() {
-        if (this.allowCancel)
+        if (this._authPrompt && this.allowCancel)
             this._authPrompt.cancel();
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]