diff options
author | Marko Kangas <marko.kangas@theqtcompany.com> | 2016-03-28 14:57:40 +0300 |
---|---|---|
committer | Marko Kangas <marko.kangas@theqtcompany.com> | 2016-04-06 06:28:23 +0000 |
commit | 608acd2415390390ae0ee7daaca57a1d91ad371c (patch) | |
tree | 26888b41a8961bb9e3f772e61bd2ec120d74514f /src | |
parent | f40e92b147560be15e0f53dfd7f6b2d698c00fb9 (diff) | |
download | qtlocation-608acd2415390390ae0ee7daaca57a1d91ad371c.tar.gz |
Fix crash when no items available and DataChanged is called.
Added check to do nothing if no items available to avoid crash.
Task-number: QTBUG-52174
Change-Id: Ibe870480b24129733b051c4b2b172b554a3c9602
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/location/qdeclarativegeomapitemview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/location/qdeclarativegeomapitemview.cpp b/src/imports/location/qdeclarativegeomapitemview.cpp index eff03b17..3e17e13a 100644 --- a/src/imports/location/qdeclarativegeomapitemview.cpp +++ b/src/imports/location/qdeclarativegeomapitemview.cpp @@ -262,6 +262,9 @@ void QDeclarativeGeoMapItemView::itemModelDataChanged(const QModelIndex &topLeft { Q_UNUSED(roles) + if (!m_itemData.count()) + return; + for (int i = topLeft.row(); i <= bottomRight.row(); ++i) { const QModelIndex index = itemModel_->index(i, 0); ItemData *itemData = m_itemData.at(i); |