From 49e5fdd7cb14d0ca9726f4aa9bd2493752472558 Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Sat, 7 Mar 2020 03:53:53 -0800 Subject: [PATCH] Remote: avoid a spurious ::g-properties-changed emission after disposal We do a force disposal when dropping device proxies, but GDBusProxy will synthesize an emission when the name owner disappears. This seems to happen after we've disposed it, so add a guard clause to prevent touching a finalized object. --- src/shell/remote.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shell/remote.js b/src/shell/remote.js index fd9d68c56..28b794162 100644 --- a/src/shell/remote.js +++ b/src/shell/remote.js @@ -117,6 +117,9 @@ var Device = GObject.registerClass({ // Proxy GObject::notify signals vfunc_g_properties_changed(changed, invalidated) { try { + if (this.__disposed !== undefined) + return; + for (let name in changed.deep_unpack()) { this.notify(toHyphenCase(name)); }