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 <david.schulz@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-04-18 07:14:58 +02:00
committed by David Schulz
parent a2170bd690
commit 02a0c6f486

View File

@@ -434,6 +434,8 @@ static void checkQmlDocumentForTestCode(QFutureInterface<TestParseResult> 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);