diff --git a/GlitchyEditor/src/EditorApp.bf b/GlitchyEditor/src/EditorApp.bf index dba63b0..9e8529f 100644 --- a/GlitchyEditor/src/EditorApp.bf +++ b/GlitchyEditor/src/EditorApp.bf @@ -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() diff --git a/GlitchyEditor/src/EditorLogger.bf b/GlitchyEditor/src/EditorLogger.bf index 51ed313..130fdeb 100644 --- a/GlitchyEditor/src/EditorLogger.bf +++ b/GlitchyEditor/src/EditorLogger.bf @@ -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))