Skip to content

Commit 286a270

Browse files
committed
Check if screen was loaded before trying to unload
1 parent c0d45c3 commit 286a270

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

monarch/monarch.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,10 @@ local function unload(screen, force)
354354
if screen.proxy then
355355
log("unload() proxy", screen.id)
356356
if screen.auto_preload and not force then
357-
msg.post(screen.proxy, DISABLE)
358-
screen.loaded = false
357+
if screen.loaded then
358+
msg.post(screen.proxy, DISABLE)
359+
screen.loaded = false
360+
end
359361
screen.preloaded = true
360362
else
361363
screen.wait_for = PROXY_UNLOADED

0 commit comments

Comments
 (0)