Fix docking fixture crash (#8640)

This commit is contained in:
metalgearsloth
2022-06-04 16:52:46 +10:00
committed by GitHub
parent 654355bddb
commit b354fcac21

View File

@@ -261,8 +261,9 @@ namespace Content.Server.Shuttles.EntitySystems
private void OnPowerChange(EntityUid uid, DockingComponent component, PowerChangedEvent args)
{
var lifestage = MetaData(uid).EntityLifeStage;
// This is because power can change during startup for <Reasons> and undock
if (MetaData(uid).EntityLifeStage < EntityLifeStage.MapInitialized) return;
if (lifestage is < EntityLifeStage.MapInitialized or >= EntityLifeStage.Terminating) return;
if (args.Powered)
{