diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-03-01 18:20:02 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-03-17 06:56:26 +0000 |
commit | 3cf9f339f2a319d99e81feebb6f5f1e428eec51c (patch) | |
tree | f41d694475a0295af2ceec334c9d17bf0c886008 /src/location/maps/qgeomappingmanager.cpp | |
parent | de165175549642c7fefa901d41ee96ef0702879c (diff) |
Replace m_mappingManagerInitialized check from qdeclaratviegeomap
Replace initialization checks with more accurate checks.
In some cases mapping manager is not able to create qgeomap
and mappingManager is initialized anyway.
Change-Id: I2265dcd82ebcd3a07ebdcfb74a6077bdd7be16c7
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/location/maps/qgeomappingmanager.cpp')
-rw-r--r-- | src/location/maps/qgeomappingmanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/location/maps/qgeomappingmanager.cpp b/src/location/maps/qgeomappingmanager.cpp index 681e68a7..5e9531ca 100644 --- a/src/location/maps/qgeomappingmanager.cpp +++ b/src/location/maps/qgeomappingmanager.cpp @@ -133,7 +133,8 @@ QGeoCameraCapabilities QGeoMappingManager::cameraCapabilities() const QGeoMap *QGeoMappingManager::createMap(QObject *parent) { QGeoMap * map = d_ptr->engine->createMap(); - connect(parent,&QObject::destroyed,map,&QGeoMap::deleteLater); + if (map) + connect(parent, &QObject::destroyed,map, &QGeoMap::deleteLater); return map; } |