1
0
mirror of synced 2024-11-12 02:00:52 +01:00

fix: Crash when right clicking search bar when a provider with no menu options is open

This commit is contained in:
WerWolv 2023-12-18 22:45:15 +01:00
parent 71763d108b
commit a3f1a5b0a9

View File

@ -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([] {