Fixed reference to uninitialized module (fixes #114)

This commit is contained in:
Timo Smit 2020-04-14 18:00:08 +02:00
parent a5415cf595
commit cb47d833cb

View file

@ -152,7 +152,10 @@ function et_InitGame(levelTime, randomSeed, restartMap)
end
function et_ShutdownGame(restartMap)
events.trigger("onGameShutdown", (restartMap == 1))
-- check whether the module has fully initialized
if events then
events.trigger("onGameShutdown", (restartMap == 1))
end
end
function et_ConsoleCommand(cmdText)