mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
messageTray: Only destroy policy after emitting ::destroy
Destroying the policy invalidates it, so accessing it from a Source::destroy handler (for example to disconnect signal handlers) currently results in warnings like: Object .Gjs_ui_messageTray_NotificationApplicationPolicy (0x7f8c7c0a64a0), has been already deallocated — impossible to access it. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2238
This commit is contained in:
parent
c89d6a633a
commit
279072795f
1 changed files with 1 additions and 2 deletions
|
|
@ -880,8 +880,6 @@ var Source = GObject.registerClass({
|
|||
}
|
||||
|
||||
destroy(reason) {
|
||||
this.policy.destroy();
|
||||
|
||||
let notifications = this.notifications;
|
||||
this.notifications = [];
|
||||
|
||||
|
|
@ -890,6 +888,7 @@ var Source = GObject.registerClass({
|
|||
|
||||
this.emit('destroy', reason);
|
||||
|
||||
this.policy.destroy();
|
||||
this.run_dispose();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue