diff --git a/Source/Editor/Windows/DebugLogWindow.cs b/Source/Editor/Windows/DebugLogWindow.cs index 36a7ffa82..ed133d4e8 100644 --- a/Source/Editor/Windows/DebugLogWindow.cs +++ b/Source/Editor/Windows/DebugLogWindow.cs @@ -447,6 +447,10 @@ namespace FlaxEditor.Windows /// public void Clear() { + lock (_locker) + { + _pendingEntries.Clear(); + } if (_entriesPanel == null) return; RemoveEntries(); @@ -740,10 +744,6 @@ namespace FlaxEditor.Windows // Clear on Play if (Editor.Options.Options.Interface.DebugLogClearOnPlay) { - lock (_locker) - { - _pendingEntries?.Clear(); - } Clear(); } }