summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlgraphicsitem
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-11-06 05:17:00 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-11-06 05:17:00 (GMT)
commit3611858fe9c14abd52ff0df927d7bf6ec992fb95 (patch)
tree7bcff344df35f3c02a2a9b93fc4a6eb71609e987 /tests/auto/declarative/qmlgraphicsitem
parent3edd93eab2d3490c5991e1601fd7b53741b4ba1f (diff)
downloadQt-3611858fe9c14abd52ff0df927d7bf6ec992fb95.zip
Qt-3611858fe9c14abd52ff0df927d7bf6ec992fb95.tar.gz
Qt-3611858fe9c14abd52ff0df927d7bf6ec992fb95.tar.bz2
Robustify test
Diffstat (limited to 'tests/auto/declarative/qmlgraphicsitem')
-rw-r--r--tests/auto/declarative/qmlgraphicsitem/tst_qmlgraphicsitem.cpp3
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) {