summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-11-16 06:09:03 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-11-16 06:09:03 (GMT)
commit0aba1250db9ac414fbe4b0fed9fcba713bf5a619 (patch)
tree9df51e80e3989d83d05f8005921a71a035deaee1 /src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
parentdf1a50f6bd25c0955c7d8e4b6b89a7b7957b69f6 (diff)
parent6cf397f7ac35a058096528a7ad8bfaf623b30747 (diff)
downloadQt-0aba1250db9ac414fbe4b0fed9fcba713bf5a619.zip
Qt-0aba1250db9ac414fbe4b0fed9fcba713bf5a619.tar.gz
Qt-0aba1250db9ac414fbe4b0fed9fcba713bf5a619.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 1f01a45..9601db0 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -937,6 +937,8 @@ void QDeclarativeVisualDataModel::setPart(const QString &part)
int QDeclarativeVisualDataModel::count() const
{
Q_D(const QDeclarativeVisualDataModel);
+ if (!d->m_delegate)
+ return 0;
return d->modelCount();
}