From 4aeae5d71891bffe270f4bdd181796962d183bda Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 20 Sep 2024 17:27:51 +0200 Subject: [PATCH] Error check: fixed build when using IMGUI_DISABLE_DEBUG_TOOLS. --- imgui.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 45f6ce36dae1..4b9daf9d2a74 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10227,10 +10227,14 @@ static void ImGui::ErrorCheckEndFrameSanityChecks() // Default implementation of ImGuiErrorLogCallback that pipe errors to DebugLog: appears in tty + Tools->DebugLog void ImGui::ErrorLogCallbackToDebugLog(void*, const char* fmt, ...) { +#ifndef IMGUI_DISABLE_DEBUG_TOOLS va_list args; va_start(args, fmt); - ImGui::DebugLogV(fmt, args); + DebugLogV(fmt, args); va_end(args); +#else + IM_UNUSED(fmt); +#endif } // Experimental recovery from incorrect usage of BeginXXX/EndXXX/PushXXX/PopXXX calls.