summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/qmlcleanup.cpp4
-rw-r--r--tests/auto/declarative/qmlinstruction/tst_qmlinstruction.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcleanup.cpp b/src/declarative/qml/qmlcleanup.cpp
index 0da6452..599e4e7 100644
--- a/src/declarative/qml/qmlcleanup.cpp
+++ b/src/declarative/qml/qmlcleanup.cpp
@@ -61,7 +61,9 @@ Create a QmlCleanup for \a engine
QmlCleanup::QmlCleanup(QmlEngine *engine)
: prev(0), next(0)
{
- Q_ASSERT(engine);
+ if (!engine)
+ return;
+
QmlEnginePrivate *p = QmlEnginePrivate::get(engine);
if (p->cleanup) next = p->cleanup;
diff --git a/tests/auto/declarative/qmlinstruction/tst_qmlinstruction.cpp b/tests/auto/declarative/qmlinstruction/tst_qmlinstruction.cpp
index 43c64cd..b53942c 100644
--- a/tests/auto/declarative/qmlinstruction/tst_qmlinstruction.cpp
+++ b/tests/auto/declarative/qmlinstruction/tst_qmlinstruction.cpp
@@ -60,7 +60,7 @@ static void msgHandler(QtMsgType, const char *msg)
void tst_qmlinstruction::dump()
{
- QmlCompiledData *data = new QmlCompiledData;
+ QmlCompiledData *data = new QmlCompiledData(0);
{
QmlInstruction i;
i.line = 0;