diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2011-06-29 16:16:09 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-08 09:04:32 +0200 |
commit | b5eb68b15896147ef6e9a9d5aa5bbaa075f2774c (patch) | |
tree | b8bcfb2b67ac8be07210f1f518dddbdc4447d736 | |
parent | 65397e60f1e376fd5e8b4b30f17ca7afa09b700c (diff) | |
download | qtlocation-b5eb68b15896147ef6e9a9d5aa5bbaa075f2774c.tar.gz |
Fix crash in when reseting model for MapObjectView.
QGeoMapObjectEngine maintains multiple lists of QGeoMapObject pointers.
When an item is removed from the model not all of these references are
removed. Causing invalid memory access at the next paint event.
Change-Id: Ia14daf64ba05386472ed14bac7d8de2f11658c0a
Reviewed-on: http://codereview.qt.nokia.com/1260
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Laing <david.laing@nokia.com>
-rw-r--r-- | src/location/maps/qgeomapobjectengine_p.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/location/maps/qgeomapobjectengine_p.cpp b/src/location/maps/qgeomapobjectengine_p.cpp index 5722dda2..7579b829 100644 --- a/src/location/maps/qgeomapobjectengine_p.cpp +++ b/src/location/maps/qgeomapobjectengine_p.cpp @@ -171,6 +171,9 @@ void QGeoMapObjectEngine::removeObject(QGeoMapObject *object) foreach (QRectF rect, rectsToUpdate) mdp->emitUpdateMapDisplay(rect); + + objectsForLatLonUpdate.removeAll(object); + objectsForPixelUpdate.removeAll(object); } } |