Fix crash in VMOps::FunctionCall

fixes #8952

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
Paul Richards 2015-04-01 21:48:51 +01:00 committed by Gunnar Beutner
parent 1c7e7dac60
commit 5cd2056f43
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ public:
static inline Value FunctionCall(ScriptFrame& frame, const Value& self, const Function::Ptr& func, const std::vector<Value>& arguments)
{
ScriptFrame vframe = (self.IsEmpty()) ? ScriptFrame() : ScriptFrame(self);
ScriptFrame vframe;
if (!self.IsEmpty())
vframe.Self = self;
return func->Invoke(arguments);
}