summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginLua.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/PluginLua.cpp')
-rw-r--r--src/Bindings/PluginLua.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index 04639da60..96c5ccde7 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -1571,6 +1571,7 @@ bool cPluginLua::AddHookRef(int a_HookType, int a_FnRefIdx)
LOGWARNING("Plugin %s tried to add a hook %d with bad handler function.", GetName().c_str(), a_HookType);
m_LuaState.LogStackTrace();
delete Ref;
+ Ref = NULL;
return false;
}