mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
maplocationmodel: fix getMapLocationForUuid()
This method did not return NULL properly if a MapLocation does not exists in the list. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
0955a5b36a
commit
f6e269c07a
1 changed files with 4 additions and 4 deletions
|
@ -129,10 +129,10 @@ quint32 MapLocationModel::selectedUuid()
|
||||||
|
|
||||||
MapLocation *MapLocationModel::getMapLocationForUuid(quint32 uuid)
|
MapLocation *MapLocationModel::getMapLocationForUuid(quint32 uuid)
|
||||||
{
|
{
|
||||||
MapLocation *location = NULL;
|
MapLocation *location;
|
||||||
foreach(location, m_mapLocations) {
|
foreach(location, m_mapLocations) {
|
||||||
if (location->getRole(MapLocation::Roles::RoleUuid) == uuid)
|
if (uuid == location->uuid())
|
||||||
break;
|
return location;
|
||||||
}
|
}
|
||||||
return location;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue