Fix exceptions on round restarts due to accessing deleted entities' components

This commit is contained in:
Víctor Aguilera Puerto
2020-06-07 15:32:38 +02:00
parent 5abd2e23f5
commit b8338bc64c
2 changed files with 6 additions and 2 deletions

View File

@@ -91,7 +91,8 @@ namespace Content.Server.GameObjects.Components.Markers
return;
}
_entityManager.SpawnEntity(_robustRandom.Pick(Prototypes), Owner.Transform.GridPosition);
if(!Owner.Deleted)
_entityManager.SpawnEntity(_robustRandom.Pick(Prototypes), Owner.Transform.GridPosition);
}
public void MapInit()