summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
-rw-r--r--src/cat/LuaScriptInterface.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index 237763e..1653e28 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -1366,13 +1366,14 @@ int LuaScriptInterface::simulation_loadStamp(lua_State * l)
}
if (tempfile)
{
- if (luacon_sim->Load(x, y, tempfile->GetGameSave()))
+ if (!luacon_sim->Load(x, y, tempfile->GetGameSave()))
{
//luacon_sim->sys_pause = (tempfile->GetGameSave()->paused | luacon_model->GetPaused())?1:0;
lua_pushinteger(l, 1);
}
else
lua_pushnil(l);
+ delete tempfile;
}
else
lua_pushnil(l);