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 *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; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue