Fixes server crash due to null construction step
ConstructionComponent.AttackBy tries calling TryProcessStep on the forward step of the construction stage, and if that fails it tries the backwards step. I many construction prototypes the backwards step is null for all stages and so clicking the construction ghost with an invalid step results in a crash due to the step passed to TryProcessStep being null.
This commit is contained in:
@@ -93,6 +93,10 @@ namespace Content.Server.GameObjects.Components.Construction
|
||||
|
||||
bool TryProcessStep(ConstructionStep step, IEntity slapped)
|
||||
{
|
||||
if (step == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var sound = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<AudioSystem>();
|
||||
|
||||
switch (step)
|
||||
|
||||
Reference in New Issue
Block a user