add an try catch to better see what might be causing this unknown crash,

This commit is contained in:
Evil Factory
2022-02-01 22:38:44 -03:00
parent 28b08becd1
commit efc62387ff
2 changed files with 10 additions and 4 deletions
@@ -1033,9 +1033,16 @@ namespace Barotrauma
public void Update()
{
if (queuedFunctionCalls.TryDequeue(out Tuple<object, object[]> result))
try
{
env.CallFunction(result.Item1, result.Item2);
if (queuedFunctionCalls.TryDequeue(out Tuple<object, object[]> result))
{
env.CallFunction(result.Item1, result.Item2);
}
}
catch (Exception ex)
{
env.HandleLuaException(ex, $"queuedFunctionCalls was {queuedFunctionCalls}");
}
}