aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL
diff options
context:
space:
mode:
authorwolf109909 <84360921+wolf109909@users.noreply.github.com>2022-11-28 05:50:26 +0800
committerGitHub <noreply@github.com>2022-11-27 22:50:26 +0100
commit4a00450e591e1bb2e8a2bc913ce1e1acfaef08b6 (patch)
treef7896e1834d06b4c45ab26043461b846c8d04c67 /NorthstarDLL
parent9ed73b5b989ce079a7349f7bdda88689fd5ac1c4 (diff)
downloadNorthstarLauncher-4a00450e591e1bb2e8a2bc913ce1e1acfaef08b6.tar.gz
NorthstarLauncher-4a00450e591e1bb2e8a2bc913ce1e1acfaef08b6.zip
Fix script compile errors not being flushed to log file (#342)
Otherwise application will crash before finishing to write to log file.
Diffstat (limited to 'NorthstarDLL')
-rw-r--r--NorthstarDLL/squirrel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/NorthstarDLL/squirrel.cpp b/NorthstarDLL/squirrel.cpp
index cd8b437c..06a88ba3 100644
--- a/NorthstarDLL/squirrel.cpp
+++ b/NorthstarDLL/squirrel.cpp
@@ -359,7 +359,11 @@ void __fastcall ScriptCompileErrorHook(HSquirrelVM* sqvm, const char* error, con
{
// kill dedicated server if we hit this
if (IsDedicatedServer())
+ {
+ // flush the logger before we abort so debug things get saved to log file
+ logger->flush();
abort();
+ }
else
{
R2::Cbuf_AddText(