From 20753bfe4e24fa9883868f351851e7377d9b9f6d Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 12 Jan 2010 11:37:16 +1000 Subject: Compile --- src/declarative/qml/qmlcleanup.cpp | 4 +++- tests/auto/declarative/qmlinstruction/tst_qmlinstruction.cpp | 2 +- 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; -- cgit v0.12