소스 검색

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

ocornut 10 년 전
부모
커밋
072c57b0ca
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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)