fix possible null reference exceptions
This commit is contained in:
@@ -17,6 +17,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
|
||||
public void Update(Squad squad)
|
||||
{
|
||||
if (currentState != null)
|
||||
currentState.Tick(squad);
|
||||
}
|
||||
|
||||
@@ -31,6 +32,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
if (newState != null)
|
||||
currentState = newState;
|
||||
|
||||
if (currentState != null)
|
||||
currentState.Activate(squad);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user