summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativegeomap_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-04-08 00:02:42 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-04-11 15:38:54 +0000
commit48c17c80b9bb003ff92150d6ca8a54109b987715 (patch)
treedc2c15614d71c1c5f4a09bf088760df425b40b81 /src/location/declarativemaps/qdeclarativegeomap_p.h
parentde46e34ca67eba6191768338bb87781e65e6a1a1 (diff)
downloadqtlocation-48c17c80b9bb003ff92150d6ca8a54109b987715.tar.gz
Protect QGeoMap pointer with QPointer
m_map inside QDeclarativeGeoMap is created, but also destroyed, by the engine. In some cases (dynamic QML object creation/destruction) the engine may disappear before the Map. This patch introduces a QPointer to prevent a dangling pointer Change-Id: Ice3c57b4dbeb96ee8d7e4d401654b9085c105dec Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomap_p.h')
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap_p.h b/src/location/declarativemaps/qdeclarativegeomap_p.h
index da430ce5..f08998e2 100644
--- a/src/location/declarativemaps/qdeclarativegeomap_p.h
+++ b/src/location/declarativemaps/qdeclarativegeomap_p.h
@@ -248,7 +248,7 @@ private:
QList<QDeclarativeGeoMapType *> m_supportedMapTypes;
QList<QDeclarativeGeoMapItemView *> m_mapViews;
QQuickGeoMapGestureArea *m_gestureArea;
- QGeoMap *m_map;
+ QPointer<QGeoMap> m_map;
QPointer<QDeclarativeGeoMapCopyrightNotice> m_copyrights;
QList<QPointer<QDeclarativeGeoMapItemBase> > m_mapItems;
QList<QPointer<QDeclarativeGeoMapItemGroup> > m_mapItemGroups;