]> granicus.if.org Git - icinga2/commitdiff
Fix crash in VMOps::FunctionCall
authorPaul Richards <paul@minimoo.org>
Wed, 1 Apr 2015 20:48:51 +0000 (21:48 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Wed, 1 Apr 2015 20:51:17 +0000 (22:51 +0200)
fixes #8952

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
lib/config/vmops.hpp

index 5a0797ee75147e1a89db575677cbdd33fc371468..a6e26199a2d0ed56fc5e6764a11891d1e62e34f6 100644 (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);
        }