From 23ae45ac01073bc691c9b3b8a72b6a30023791de Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sun, 10 Dec 2023 03:22:13 -0800 Subject: [PATCH] prevent script errors when exiting world screen when the artifact list is showing at the time of screen exit --- plugins/lua/sort/world.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/lua/sort/world.lua b/plugins/lua/sort/world.lua index a4cf6c0e5..65263cb98 100644 --- a/plugins/lua/sort/world.lua +++ b/plugins/lua/sort/world.lua @@ -44,6 +44,7 @@ end local function cleanup_artifact_vectors(data) local vs_world = dfhack.gui.getDFViewscreen(true) + if not df.viewscreen_worldst:is_instance(vs_world) then return end vs_world.artifact:assign(data.saved_original) vs_world.artifact:resize(data.saved_original_size) vs_world.artifact_arl:assign(data.saved_flags)