diff --git a/lib/base/scriptinterpreter.cpp b/lib/base/scriptinterpreter.cpp index 08572b28a..947195e6d 100644 --- a/lib/base/scriptinterpreter.cpp +++ b/lib/base/scriptinterpreter.cpp @@ -40,9 +40,7 @@ void ScriptInterpreter::SubscribeFunction(const String& name) ObjectLock olock(this); m_SubscribedFunctions.insert(name); - - ScriptFunction::Ptr sf = make_shared(boost::bind(&ScriptInterpreter::ProcessCall, this, name, _1)); - ScriptFunction::Register(name, sf); + ScriptFunction::Register(name, boost::bind(&ScriptInterpreter::ProcessCall, this, name, _1)); } void ScriptInterpreter::UnsubscribeFunction(const String& name)