From 0dd5388379479b749dba1def17e8e633316d18cc Mon Sep 17 00:00:00 2001 From: Bitl Date: Thu, 23 Mar 2023 09:44:45 -0700 Subject: [PATCH] fix crash --- Novetus/NovetusCore/StorageAndFunctions/Util.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Novetus/NovetusCore/StorageAndFunctions/Util.cs b/Novetus/NovetusCore/StorageAndFunctions/Util.cs index 595d957..aa8d8ee 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/Util.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/Util.cs @@ -615,6 +615,8 @@ namespace Novetus.Core public static void ConsolePrint(string text, int type = 1, bool noLog = false, bool scrollDown = true) { + + switch (type) { case 0: @@ -651,6 +653,9 @@ namespace Novetus.Core #if LAUNCHER if (GlobalVars.consoleForm != null) { + if (GlobalVars.consoleForm.InvokeRequired) + return; + FormPrint(text, type, GlobalVars.consoleForm.ConsoleBox, scrollDown); } #endif