simonmicro / better-backgrounds

A Cinnamon desktop applet to change your wallpaper to random images from many sources
GNU General Public License v3.0
2 stars 1 forks source link

Fix timeout removal exceptions #3

Closed simonmicro closed 4 years ago

simonmicro commented 4 years ago

...sometimes the timeout is already invalid, therefore an exception is thrown upon removal... Maybe first set null, then try to remove?

warning t=2020-04-28T12:41:53Z Invalid or null source id used when attempting to run Mainloop.source_remove()
overrideDumpStack/global.dump_gjs_stack@/usr/share/cinnamon/js/ui/overrides.js:103:42
overrideMainloop/Mainloop.source_remove@/usr/share/cinnamon/js/ui/overrides.js:137:13
_icon_stop@/.../.local/share/cinnamon/applets/better-backgrounds@simonmicro/applet.js:78:9
anonymous/_change_background/<@/.../.local/share/cinnamon/applets/better-backgrounds@simonmicro/applet.js:114:13
info t=2020-04-28T13:12:00Z [better-backgrounds@simonmicro] Downloading https://source.unsplash.com/3840x1080/?nature
warning t=2020-04-28T13:12:03Z Invalid or null source id used when attempting to run Mainloop.source_remove()
overrideDumpStack/global.dump_gjs_stack@/usr/share/cinnamon/js/ui/overrides.js:103:42
overrideMainloop/Mainloop.source_remove@/usr/share/cinnamon/js/ui/overrides.js:137:13
_timeout_disable@/.../.local/share/cinnamon/applets/better-backgrounds@simonmicro/applet.js:52:13
_timeout_enable@/.../.local/share/cinnamon/applets/better-backgrounds@simonmicro/applet.js:57:9
_timeout_update@/.../.local/share/cinnamon/applets/better-backgrounds@simonmicro/applet.js:45:13
anonymous/_change_background/<@/.../.local/share/cinnamon/applets/better-backgrounds@simonmicro/applet.js:113:13