ocornut / imgui_test_engine

Dear ImGui Automation Engine & Test Suite
386 stars 40 forks source link

Segfault in ImGuiTestContext::ComboClick #44

Closed mgerhardy closed 2 months ago

mgerhardy commented 2 months ago
const char* p = ImStrchrRangeWithEscaping(path, path_end, '/');

might return null and maybe a IM_CHECK_XXX call should get added to inform the user that the input was wrong.

#5  0x000055555cd0e6b5 in ImGuiTestContext::ComboClick (this=0x7fffced84750, ref=...) at /home/mgerhardy/dev/oss/engine/src/modules/ui/dearimgui/imgui_test_engine/imgui_te_context.cpp:3303
3303        Str128f combo_item_buf = Str128f("//%s/**/%s", popup->Name, p + 1);
(gdb) p popup
$1 = (ImGuiWindow *) 0x51900005c880
(gdb) p popup->Name
$2 = 0x50200012c050 "##Combo_00"
(gdb) p p
$3 = 0x0
ocornut commented 2 months ago

Pushed a check for it, thanks!