Day 327: Still haven't managed to fix rare NRE that happens with timers
Starting to run out of food.
This commit is contained in:
@@ -66,6 +66,8 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
List<TimedAction> timedActionsToRemove = new List<TimedAction>();
|
List<TimedAction> timedActionsToRemove = new List<TimedAction>();
|
||||||
for (int i = 0; i < timedActions.Count; i++)
|
for (int i = 0; i < timedActions.Count; i++)
|
||||||
@@ -95,6 +97,12 @@ namespace Barotrauma
|
|||||||
timedActions.Remove(timedAction);
|
timedActions.Remove(timedAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (NullReferenceException e)
|
||||||
|
{
|
||||||
|
GameMain.LuaCs.PrintError("Error while executing timers... This shouldn't happen... Why do we a NRE here???", LuaCsMessageOrigin.Unknown);
|
||||||
|
GameMain.LuaCs.HandleException(e, LuaCsMessageOrigin.Unknown);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user