Initialize baseObject.
authorRoberto Raggi <roberto.raggi@nokia.com>
Wed, 9 May 2012 15:28:55 +0000 (17:28 +0200)
committerRoberto Raggi <roberto.raggi@nokia.com>
Wed, 9 May 2012 15:28:55 +0000 (17:28 +0200)
qmljs_runtime.cpp

index 49380d0..3486a65 100644 (file)
@@ -381,14 +381,15 @@ void __qmljs_call_property(Context *context, Value *result, Value *base, String
     Value baseObject;
     Value thisObject;
     if (base) {
+        baseObject = *base;
         if (baseObject.type != OBJECT_TYPE)
-            __qmljs_to_object(context, &baseObject, base);
+            __qmljs_to_object(context, &baseObject, &baseObject);
+        assert(baseObject.type == OBJECT_TYPE);
         thisObject = baseObject;
     } else {
         baseObject = context->activation;
         __qmljs_init_null(context, &thisObject);
     }
-    assert(baseObject.type == OBJECT_TYPE);
     Value func;
     baseObject.objectValue->get(name, &func);
     if (func.type == OBJECT_TYPE) {