3
0
mirror of https://github.com/britzl/monarch.git synced 2025-06-27 02:17:53 +02:00

Check if screen was loaded before trying to unload

This commit is contained in:
Björn Ritzl 2022-07-05 22:54:40 +02:00
parent c0d45c3d5c
commit 286a270a1c

View File

@ -354,8 +354,10 @@ local function unload(screen, force)
if screen.proxy then if screen.proxy then
log("unload() proxy", screen.id) log("unload() proxy", screen.id)
if screen.auto_preload and not force then if screen.auto_preload and not force then
msg.post(screen.proxy, DISABLE) if screen.loaded then
screen.loaded = false msg.post(screen.proxy, DISABLE)
screen.loaded = false
end
screen.preloaded = true screen.preloaded = true
else else
screen.wait_for = PROXY_UNLOADED screen.wait_for = PROXY_UNLOADED