From 5cd2056f43db5f68a22fdc5ddbf79d562bea711c Mon Sep 17 00:00:00 2001 From: Paul Richards Date: Wed, 1 Apr 2015 21:48:51 +0100 Subject: [PATCH] Fix crash in VMOps::FunctionCall fixes #8952 Signed-off-by: Gunnar Beutner --- lib/config/vmops.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/config/vmops.hpp b/lib/config/vmops.hpp index 5a0797ee7..a6e26199a 100644 --- a/lib/config/vmops.hpp +++ b/lib/config/vmops.hpp @@ -89,7 +89,10 @@ public: static inline Value FunctionCall(ScriptFrame& frame, const Value& self, const Function::Ptr& func, const std::vector& arguments) { - ScriptFrame vframe = (self.IsEmpty()) ? ScriptFrame() : ScriptFrame(self); + ScriptFrame vframe; + + if (!self.IsEmpty()) + vframe.Self = self; return func->Invoke(arguments); } -- 2.40.0