Push Loggers earlyer to hopefully avoid race condition

+ Fix null check in EditorLogger
This commit is contained in:
Simon Lübeß
2023-08-14 22:09:35 +02:00
parent 040e87d57f
commit f71e851ab5
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -11,10 +11,10 @@ namespace GlitchyEditor
public this(String[] args)
{
PushLayer(new EditorLayer(args, _contentManager));
Log.ClientLogger = new EditorLogger();
Log.EngineLogger = new EditorLogger() { IsEngineLogger = true };
PushLayer(new EditorLayer(args, _contentManager));
}
protected override IContentManager InitContentManager()
+1 -1
View File
@@ -113,7 +113,7 @@ public class EditorLogger : Logger
Debug.Write($"[{timestamp:HH:mm:ss.fff}] ({_name})|{level.UpperString}: {message}\n");
if (Editor.Instance == null)
if (Editor.Instance?.LogWindow == null)
return;
if (args.Count > 0 && (var ex = args[^1] as MonoExceptionHelper))