Explorar o código

Setting io.LogFilename to NULL disable default LogToFile() (part of #175)

ocornut %!s(int64=10) %!d(string=hai) anos
pai
achega
072c57b0ca
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      imgui.cpp

+ 4 - 0
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)