diff options
-rw-r--r-- | tests/auto/declarative/qmlgraphicsitem/tst_qmlgraphicsitem.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlgraphicsitem/tst_qmlgraphicsitem.cpp b/tests/auto/declarative/qmlgraphicsitem/tst_qmlgraphicsitem.cpp index b3b5374..b4b3eaf 100644 --- a/tests/auto/declarative/qmlgraphicsitem/tst_qmlgraphicsitem.cpp +++ b/tests/auto/declarative/qmlgraphicsitem/tst_qmlgraphicsitem.cpp @@ -213,6 +213,9 @@ void tst_QmlGraphicsItem::keyNavigation() template<typename T> T *tst_QmlGraphicsItem::findItem(QmlGraphicsItem *parent, const QString &objectName) { + if (!parent) + return 0; + const QMetaObject &mo = T::staticMetaObject; //qDebug() << parent->QGraphicsObject::children().count() << "children"; for (int i = 0; i < parent->QGraphicsObject::children().count(); ++i) { |