(c35335f47) Fixed CharacterInfo.IncreaseSkillLevel crashing if the character has been removed, steering component stops giving xp to the user if the user is removed. Closes #1553

This commit is contained in:
Joonas Rikkonen
2019-06-09 17:44:02 +03:00
parent fdd6850743
commit 81b6d2199f
2 changed files with 6 additions and 1 deletions
@@ -210,6 +210,11 @@ namespace Barotrauma.Items.Components
if (voltage < minVoltage && currPowerConsumption > 0.0f) { return; }
if (user != null && user.Removed)
{
user = null;
}
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
if (autoPilot)