From 02a0c6f4867748c14e501be2ceb27301e5e08d47 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 18 Apr 2016 07:14:58 +0200 Subject: [PATCH] AutoTest: Ignore nullptr documents It could happen that Qml related docs have not been added to the QmlJSModelManager when trying to use them on our side. Just ignore them when this happens as they will be added manually as they will get added automatically when parsing the respective main cpp file. Change-Id: I25c4b6d9159ad4ff8def3148c2a04356380fbd27 Reviewed-by: David Schulz --- src/plugins/autotest/testcodeparser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/autotest/testcodeparser.cpp b/src/plugins/autotest/testcodeparser.cpp index 7fb0fc1897e..da95b7273ee 100644 --- a/src/plugins/autotest/testcodeparser.cpp +++ b/src/plugins/autotest/testcodeparser.cpp @@ -434,6 +434,8 @@ static void checkQmlDocumentForTestCode(QFutureInterface future const QmlJS::Document::Ptr &qmlJSDoc, const QString &proFile = QString()) { + if (qmlJSDoc.isNull()) + return; QmlJS::AST::Node *ast = qmlJSDoc->ast(); QTC_ASSERT(ast, return); TestQmlVisitor qmlVisitor(qmlJSDoc);