Menus: fixed closing a menu by clicking on its menu-bar item when inside a popup. (#3496, #4797)

This commit is contained in:
xndcn
2021-12-10 18:47:54 +01:00
committed by ocornut
parent c801799218
commit 8a9fe26866
4 changed files with 4 additions and 4 deletions

View File

@ -12011,8 +12011,7 @@ void ImGui::DebugNodeDrawList(ImGuiWindow* window, const ImDrawList* draw_list,
}
ImDrawList* fg_draw_list = GetForegroundDrawList(window); // Render additional visuals into the top-most draw list
IM_ASSERT(fg_draw_list != NULL); // For static analyzers
if (window && IsItemHovered())
if (window && IsItemHovered() && fg_draw_list)
fg_draw_list->AddRect(window->Pos, window->Pos + window->Size, IM_COL32(255, 255, 0, 255));
if (!node_open)
return;