aboutsummaryrefslogtreecommitdiffstats
path: root/src/v4/qv4v8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4/qv4v8.cpp')
-rw-r--r--src/v4/qv4v8.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/v4/qv4v8.cpp b/src/v4/qv4v8.cpp
index 4adc706f77..835c825dfb 100644
--- a/src/v4/qv4v8.cpp
+++ b/src/v4/qv4v8.cpp
@@ -2108,10 +2108,11 @@ Local<Object> Context::GetCallingQmlGlobal()
while (ctx && ctx->outer != engine->rootContext)
ctx = ctx->outer;
- if (!ctx)
+ assert(ctx);
+ if (!ctx->type == ExecutionContext::Type_QmlContext)
return Local<Object>();
- return Local<Object>::New(Value::fromVmValue(VM::Value::fromObject(ctx->activation)));
+ return Local<Object>::New(Value::fromVmValue(VM::Value::fromObject(static_cast<CallContext *>(ctx)->activation)));
}
Local<Value> Context::GetCallingScriptData()