debug check for weird timer crash

This commit is contained in:
Evil Factory
2022-06-29 20:22:33 -03:00
parent 3418132b90
commit 4a706c504a
2 changed files with 6 additions and 1 deletions

View File

@@ -216,7 +216,7 @@ namespace Barotrauma
public static void PrintCsError(object message) => PrintErrorBase("[SV CS ERROR] ", message, "Null");
public static void PrintBothError(object message) => PrintErrorBase("[SV ERROR] ", message, "Null");
#else
private void PrintError(object message) => PrintErrorBase("[CL LUA ERROR] ", message, "nil");
public void PrintError(object message) => PrintErrorBase("[CL LUA ERROR] ", message, "nil");
public static void PrintCsError(object message) => PrintErrorBase("[CL CS ERROR] ", message, "Null");
public static void PrintBothError(object message) => PrintErrorBase("[CL ERROR] ", message, "Null");
#endif

View File

@@ -61,6 +61,11 @@ namespace Barotrauma
{
while (timedActions.Count > 0)
{
if (timedActions == null)
{
throw new Exception($"timedActions was null, how is this possible? On MainThread: {GameMain.MainThread == System.Threading.Thread.CurrentThread}");
}
TimedAction timedAction = timedActions[0];
if (Time >= timedAction.executionTime)
{