diff --git a/plugins/builtin/source/content/ui_items.cpp b/plugins/builtin/source/content/ui_items.cpp index bb6cc22bf..0394186b9 100644 --- a/plugins/builtin/source/content/ui_items.cpp +++ b/plugins/builtin/source/content/ui_items.cpp @@ -182,10 +182,12 @@ namespace hex::plugin::builtin { }); EventFrameBegin::subscribe([] { - if (ImGui::BeginPopup("ProviderMenu") && rightClickedProvider != nullptr && !rightClickedProvider->getMenuEntries().empty()) { - drawProviderContextMenu(rightClickedProvider); - ImGui::EndPopup(); - } + if (ImGui::BeginPopup("ProviderMenu")) { + if (rightClickedProvider != nullptr && !rightClickedProvider->getMenuEntries().empty()) + drawProviderContextMenu(rightClickedProvider); + + ImGui::EndPopup(); + } }); ContentRegistry::Interface::addToolbarItem([] {