diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qdeclarativexmllistmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 24edc89..ce5b483 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -476,7 +476,7 @@ public: void QDeclarativeXmlListModelPrivate::append_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, QDeclarativeXmlListModelRole *role) { QDeclarativeXmlListModel *_this = qobject_cast<QDeclarativeXmlListModel *>(list->object); - if (_this) { + if (_this && role) { int i = _this->d_func()->roleObjects.count(); _this->d_func()->roleObjects.append(role); if (_this->d_func()->roleNames.contains(role->name())) { |