Skip to content

Commit

Permalink
Remote: avoid a spurious ::g-properties-changed emission after disposal
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
andyholmes committed Mar 7, 2020
1 parent 7a4f0de commit 49e5fdd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shell/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 49e5fdd

Please sign in to comment.