diff --git a/imgui.cpp b/imgui.cpp index 12e25ca4..a97d0771 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4394,7 +4394,11 @@ void ImGui::LogToFile(int max_depth, const char* filename) if (g.LogEnabled) return; if (!filename) + { filename = g.IO.LogFilename; + if (!filename) + return; + } g.LogFile = fopen(filename, "ab"); if (!g.LogFile)