summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-models/maplocationmodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp
index 3a8db96d4..bc53d6c0b 100644
--- a/qt-models/maplocationmodel.cpp
+++ b/qt-models/maplocationmodel.cpp
@@ -129,10 +129,10 @@ quint32 MapLocationModel::selectedUuid()
MapLocation *MapLocationModel::getMapLocationForUuid(quint32 uuid)
{
- MapLocation *location = NULL;
+ MapLocation *location;
foreach(location, m_mapLocations) {
- if (location->getRole(MapLocation::Roles::RoleUuid) == uuid)
- break;
+ if (uuid == location->uuid())
+ return location;
}
- return location;
+ return NULL;
}