status/network: Disconnect signal handler on destroy in NMConnectionItem

Otherwise this can trigger _sync() calls after the objects it is trying
to update have been destroyed.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4013

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1782>
This commit is contained in:
Sebastian Keller 2021-03-30 16:37:05 +02:00 committed by Marge Bot
parent 02b06385ea
commit dfc44973de

View File

@ -128,6 +128,11 @@ var NMConnectionItem = class {
}
destroy() {
if (this._activeConnectionChangedId) {
this._activeConnection.disconnect(this._activeConnectionChangedId);
this._activeConnectionChangedId = 0;
}
this.labelItem.destroy();
this.radioItem.destroy();
}