summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativevme.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-01 07:11:36 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-01 07:11:36 (GMT)
commit8907d7cc427e5f1022c6f25944a123e65391c4f2 (patch)
treeb74b14dea47964994f749bf5a5ae88cc31d51843 /src/declarative/qml/qdeclarativevme.cpp
parentb8b4613800abfe1bc8861011c7152d6d242414e1 (diff)
downloadQt-8907d7cc427e5f1022c6f25944a123e65391c4f2.zip
Qt-8907d7cc427e5f1022c6f25944a123e65391c4f2.tar.gz
Qt-8907d7cc427e5f1022c6f25944a123e65391c4f2.tar.bz2
Crash: Assign context in CreateSimpleObject too
Diffstat (limited to 'src/declarative/qml/qdeclarativevme.cpp')
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 0bdc4d5..487ec0c 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -255,13 +255,13 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
ddata->columnNumber = instr.createSimple.column;
QObjectPrivate::get(o)->declarativeData = ddata;
-
- ddata->nextContextObject = ctxt->contextObjects;
+ ddata->context = ddata->outerContext = ctxt;
+ ddata->nextContextObject = ctxt->contextObjects;
if (ddata->nextContextObject)
- ddata->nextContextObject->prevContextObject = &ddata->nextContextObject;
- ddata->prevContextObject = &ctxt->contextObjects;
- ctxt->contextObjects = ddata;
-
+ ddata->nextContextObject->prevContextObject = &ddata->nextContextObject;
+ ddata->prevContextObject = &ctxt->contextObjects;
+ ctxt->contextObjects = ddata;
+
QObject *parent = stack.top();
QDeclarative_setParent_noEvent(o, parent);