mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 15:41:13 -04:00
[Client] Fix error when trying to delete player markers that don't exist
This commit is contained in:
parent
cf41956cad
commit
e042673779
@ -235,7 +235,7 @@ void DedicatedPlayer::setCell()
|
|||||||
|
|
||||||
// Remove the marker entirely if this player has moved to an interior that is inactive for us
|
// 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))
|
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
|
// Otherwise, update their marker so the player shows up in the right cell on the world map
|
||||||
else
|
else
|
||||||
updateMarker();
|
updateMarker();
|
||||||
@ -269,7 +269,10 @@ void DedicatedPlayer::removeMarker()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
markerEnabled = false;
|
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)
|
void DedicatedPlayer::setMarkerState(bool state)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user