This fixes the following log spam:
(com.github.Aylur.ags:2273075): Gjs-CRITICAL **: 11:15:29.279: Object .Ags_Label (0x5f2be6736120), has been already disposed — impossible to get any property from it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x5f2be48b33d0 ==
#0 7ffcd01459e0 b resource:///com/github/Aylur/ags/widgets/label.js:39 (1dcdaf08bb00 @ 10)
#1 5f2be497b5e0 i file:///home/foobar/.config/ags/modules/.commonwidgets/notification.js:253 (1dcdaf0b72e0 @ 10)
#2 5f2be497b560 i resource:///com/github/Aylur/ags/utils/timeout.js:14 (1f5daab1150 @ 6)
#3 5f2be497b498 i resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266 (1f5daa7d560 @ 139)
(com.github.Aylur.ags:2273075): Gjs-CRITICAL **: 11:15:29.279: Object .Ags_Label (0x5f2be6736120), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x5f2be48b33d0 ==
#0 7ffcd01459e0 b resource:///com/github/Aylur/ags/widgets/label.js:51 (1dcdaf08bb00 @ 190)
#1 5f2be497b5e0 i file:///home/foobar/.config/ags/modules/.commonwidgets/notification.js:253 (1dcdaf0b72e0 @ 10)
#2 5f2be497b560 i resource:///com/github/Aylur/ags/utils/timeout.js:14 (1f5daab1150 @ 6)
#3 5f2be497b498 i resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266 (1f5daa7d560 @ 139)
For unknown reason, an unknown program (even invisible in D-Spy)
occasionally populates an empty tray item of the following properties:
TrayItem {
"category": null,
"id": null,
"title": null,
"status": null,
"window-id": null,
"is-menu": null,
"tooltip-markup": "",
"icon": "image-missing"
}
Add a null check for the item id to workaround the issue.