summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmapwidgethelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qmlmapwidgethelper.cpp')
-rw-r--r--mobile-widgets/qmlmapwidgethelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmapwidgethelper.cpp b/mobile-widgets/qmlmapwidgethelper.cpp
index 1ad5503dc..ba197f63f 100644
--- a/mobile-widgets/qmlmapwidgethelper.cpp
+++ b/mobile-widgets/qmlmapwidgethelper.cpp
@@ -113,7 +113,7 @@ void MapWidgetHelper::reloadMapLocations()
QString name(ds->name);
// don't add dive locations with the same name, unless they are
// at least MIN_DISTANCE_BETWEEN_DIVE_SITES_M apart
- if (locationNameMap[name]) {
+ if (locationNameMap.contains(name)) {
MapLocation *existingLocation = locationNameMap[name];
QGeoCoordinate coord = qvariant_cast<QGeoCoordinate>(existingLocation->getRole(MapLocation::Roles::RoleCoordinate));
if (dsCoord.distanceTo(coord) < MIN_DISTANCE_BETWEEN_DIVE_SITES_M)