Skip to content

Commit

Permalink
TestEngine: protect ImGuiTestEngineHook_Log() against e.g. no running…
Browse files Browse the repository at this point in the history
… test.
  • Loading branch information
ocornut committed Sep 24, 2024
1 parent 31a75c6 commit ad0d577
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions imgui_test_engine/imgui_te_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2152,6 +2152,8 @@ void ImGuiTestEngineHook_ItemInfo(ImGuiContext* ui_ctx, ImGuiID id, const char*
void ImGuiTestEngineHook_Log(ImGuiContext* ui_ctx, const char* fmt, ...)
{
ImGuiTestEngine* engine = (ImGuiTestEngine*)ui_ctx->TestEngine;
if (engine == NULL || engine->TestContext == NULL)
return;

va_list args;
va_start(args, fmt);
Expand Down

0 comments on commit ad0d577

Please sign in to comment.