summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativebinding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativebinding.cpp')
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index ca3bc37..689cd00 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -243,12 +243,13 @@ QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeCont
if (id < 0)
return 0;
+ Q_ASSERT(ctxt);
QDeclarativeContextData *ctxtdata = QDeclarativeContextData::get(ctxt);
- QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(qmlEngine(obj));
+ QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(ctxtdata->engine);
QDeclarativeCompiledData *cdata = 0;
QDeclarativeTypeData *typeData = 0;
- if (engine && ctxtdata && !ctxtdata->url.isEmpty()) {
+ if (!ctxtdata->url.isEmpty()) {
typeData = engine->typeLoader.get(ctxtdata->url);
cdata = typeData->compiledData();
}