Blame SOURCES/0001-shellEntry-Disconnect-handler-on-destroy.patch

477568
From fd8c4dc073b121b1093d68472cac3292d2c6605c Mon Sep 17 00:00:00 2001
477568
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
477568
Date: Mon, 14 Jun 2021 17:59:39 +0200
477568
Subject: [PATCH] shellEntry: Disconnect handler on destroy
477568
477568
Actors will get unmapped on destroy, so unless we disconnect from
477568
the notify::mapped signal, the handler will run one last time and
477568
try to access methods/properties on the invalidated actor.
477568
---
477568
 js/ui/shellEntry.js | 3 ++-
477568
 1 file changed, 2 insertions(+), 1 deletion(-)
477568
477568
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
477568
index 4a30b22f7..53bd1daa1 100644
477568
--- a/js/ui/shellEntry.js
477568
+++ b/js/ui/shellEntry.js
477568
@@ -186,7 +186,7 @@ class CapsLockWarning extends St.Label {
477568
         this._keymap = Clutter.get_default_backend().get_keymap();
477568
         this._stateChangedId = 0;
477568
 
477568
-        this.connect('notify::mapped', () => {
477568
+        const mappedId = this.connect('notify::mapped', () => {
477568
             if (this.is_mapped()) {
477568
                 this._stateChangedId = this._keymap.connect('state-changed',
477568
                     () => this._sync(true));
477568
@@ -201,6 +201,7 @@ class CapsLockWarning extends St.Label {
477568
         this.connect('destroy', () => {
477568
             if (this._stateChangedId)
477568
                 this._keymap.disconnect(this._stateChangedId);
477568
+            this.disconnect(mappedId);
477568
         });
477568
     }
477568
 
477568
-- 
477568
2.31.1
477568