fix crash

This commit is contained in:
Bitl 2023-03-23 09:44:45 -07:00
parent 43baf8f171
commit 0dd5388379
1 changed files with 5 additions and 0 deletions

View File

@ -615,6 +615,8 @@ namespace Novetus.Core
public static void ConsolePrint(string text, int type = 1, bool noLog = false, bool scrollDown = true) public static void ConsolePrint(string text, int type = 1, bool noLog = false, bool scrollDown = true)
{ {
switch (type) switch (type)
{ {
case 0: case 0:
@ -651,6 +653,9 @@ namespace Novetus.Core
#if LAUNCHER #if LAUNCHER
if (GlobalVars.consoleForm != null) if (GlobalVars.consoleForm != null)
{ {
if (GlobalVars.consoleForm.InvokeRequired)
return;
FormPrint(text, type, GlobalVars.consoleForm.ConsoleBox, scrollDown); FormPrint(text, type, GlobalVars.consoleForm.ConsoleBox, scrollDown);
} }
#endif #endif