aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/squirrel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/squirrel.cpp')
-rw-r--r--NorthstarDLL/squirrel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/NorthstarDLL/squirrel.cpp b/NorthstarDLL/squirrel.cpp
index 4bd4bca8..cf5cb49e 100644
--- a/NorthstarDLL/squirrel.cpp
+++ b/NorthstarDLL/squirrel.cpp
@@ -135,7 +135,7 @@ template <ScriptContext context> void SquirrelManager<context>::VMDestroyed()
template <ScriptContext context> void SquirrelManager<context>::ExecuteCode(const char* pCode)
{
- if (!m_pSQVM)
+ if (!m_pSQVM || !m_pSQVM->sqvm)
{
spdlog::error("Cannot execute code, {} squirrel vm is not initialised", GetContextName(context));
return;