don't call stop hook if we are not in the main thread anymore (likely caused by the exiting of the program)
This commit is contained in:
@@ -338,7 +338,12 @@ namespace Barotrauma
|
||||
}
|
||||
foreach (var mod in ACsMod.LoadedMods.ToArray()) mod.Dispose();
|
||||
ACsMod.LoadedMods.Clear();
|
||||
Hook?.Call("stop");
|
||||
|
||||
|
||||
if (Thread.CurrentThread == GameMain.MainThread)
|
||||
{
|
||||
Hook?.Call("stop");
|
||||
}
|
||||
|
||||
Game?.Stop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user