[gnome-shell/eos3.8: 233/255] screenShield: Fix use of null this._dialog
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/eos3.8: 233/255] screenShield: Fix use of null this._dialog
- Date: Wed, 10 Jun 2020 19:17:35 +0000 (UTC)
commit f02feca1f0fc9c9437bb9163da325cf416e813e7
Author: Matthew Leeds <matthew leeds endlessm com>
Date: Thu Apr 23 17:42:16 2020 -0700
screenShield: Fix use of null this._dialog
On Fedora 32 if you close the laptop lid during gnome-initial-setup,
gnome-shell hits this error:
JS ERROR: Exception in callback for signal: prepare-for-sleep: TypeError: this._dialog is undefined
_resetLockScreen@resource:///org/gnome/shell/ui/screenShield.js:434:9
activate@resource:///org/gnome/shell/ui/screenShield.js:571:14
lock@resource:///org/gnome/shell/ui/screenShield.js:617:14
_prepareForSleep@resource:///org/gnome/shell/ui/screenShield.js:219:22
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:133:47
_prepareForSleep@resource:///org/gnome/shell/misc/loginManager.js:198:14
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:133:47
_convertToNativeSignal@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:169:19
This is because _ensureUnlockDialog() hit its first early return. So
return early from activate() in that case, so this._dialog doesn't get
used while it's null.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1213
(cherry picked from commit 527ce66cd452aa64a0e64e5fc368698d64116192)
(cherry picked from commit ef0d41969ad960dec88529312e52a5931bdb8afa)
js/ui/screenShield.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index f15d05ebf3..1d5521dc4f 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -621,7 +621,8 @@ var ScreenShield = class {
if (this._activationTime == 0)
this._activationTime = GLib.get_monotonic_time();
- this._ensureUnlockDialog(true);
+ if (!this._ensureUnlockDialog(true))
+ return;
this._isGreeter = Main.sessionMode.isGreeter;
if (!this._isGreeter) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]