mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
messageTray: Ensure _updateDatetimeId idle callback is cancelled
If the idle callback is not explicitly removed when the notification is
destroyed, it may be invoked after destruction, and try to modify the
notification after it’s been freed.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3352>
(cherry picked from commit 8176d6b51c)
This commit is contained in:
parent
0af05089fa
commit
39526f7665
1 changed files with 5 additions and 0 deletions
|
|
@ -498,6 +498,11 @@ export const Notification = GObject.registerClass({
|
|||
|
||||
destroy(reason = NotificationDestroyedReason.DISMISSED) {
|
||||
this.emit('destroy', reason);
|
||||
|
||||
if (this._updateDatetimeId)
|
||||
GLib.source_remove(this._updateDatetimeId);
|
||||
delete this._updateDatetimeId;
|
||||
|
||||
this.run_dispose();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue