From bea34da289a39e88ca1a6bf0af69a0865e3ff7f8 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 27 Mar 2020 20:35:36 -0300 Subject: [PATCH] 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 d27b1d59c..2170f12a7 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(); }