mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
[Client] Fix error when trying to delete player markers that don't exist
This commit is contained in:
parent
cf41956cad
commit
e042673779
1 changed files with 5 additions and 2 deletions
|
@ -235,7 +235,7 @@ void DedicatedPlayer::setCell()
|
|||
|
||||
// Remove the marker entirely if this player has moved to an interior that is inactive for us
|
||||
if (!cell.isExterior() && !Main::get().getCellController()->isActiveWorldCell(cell))
|
||||
Main::get().getGUIController()->mPlayerMarkers.deleteMarker(marker);
|
||||
removeMarker();
|
||||
// Otherwise, update their marker so the player shows up in the right cell on the world map
|
||||
else
|
||||
updateMarker();
|
||||
|
@ -269,7 +269,10 @@ void DedicatedPlayer::removeMarker()
|
|||
return;
|
||||
|
||||
markerEnabled = false;
|
||||
Main::get().getGUIController()->mPlayerMarkers.deleteMarker(marker);
|
||||
GUIController *gui = Main::get().getGUIController();
|
||||
|
||||
if (gui->mPlayerMarkers.contains(marker))
|
||||
Main::get().getGUIController()->mPlayerMarkers.deleteMarker(marker);
|
||||
}
|
||||
|
||||
void DedicatedPlayer::setMarkerState(bool state)
|
||||
|
|
Loading…
Reference in a new issue