summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/LuaTools.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/LuaTools.cpp b/library/LuaTools.cpp
index a283d215..8fce0076 100644
--- a/library/LuaTools.cpp
+++ b/library/LuaTools.cpp
@@ -1814,7 +1814,9 @@ void DFHack::Lua::Core::onUpdate(color_ostream &out)
lua_rawgetp(State, LUA_REGISTRYINDEX, &DFHACK_TIMEOUTS_TOKEN);
run_timers(out, State, frame_timers, frame[1], ++frame_idx);
- run_timers(out, State, tick_timers, frame[1], world->frame_counter);
+
+ if (world)
+ run_timers(out, State, tick_timers, frame[1], world->frame_counter);
}
void DFHack::Lua::Core::Init(color_ostream &out)