diff --git a/imgui.cpp b/imgui.cpp index c840ba73..abc8a55f 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -7446,8 +7446,9 @@ bool ImGui::BeginMenuBar() ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) return false; + if (!(window->Flags & ImGuiWindowFlags_MenuBar)) + return false; - IM_ASSERT(window->Flags & ImGuiWindowFlags_MenuBar); IM_ASSERT(!window->DC.MenuBarAppending); window->DC.MenuBarAppending = true; ImGui::PushID("##menubar");