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

fix: Crash when clicking on Advanced search in find popup

This commit is contained in:
WerWolv 2024-05-17 23:16:49 +02:00
parent b54f46de30
commit 2546c042dc

View File

@ -47,10 +47,13 @@ namespace hex::plugin::builtin {
} }
if(ImGuiExt::IconHyperlink(ICON_VS_SEARCH, "hex.builtin.view.hex_editor.search.advanced"_lang)) { if(ImGuiExt::IconHyperlink(ICON_VS_SEARCH, "hex.builtin.view.hex_editor.search.advanced"_lang)) {
const auto& view = ContentRegistry::Views::getViewByName("hex.builtin.view.find.name"); TaskManager::doLater([&editor] {
view->getWindowOpenState() = true; const auto& view = ContentRegistry::Views::getViewByName("hex.builtin.view.find.name");
ImGui::SetWindowFocus(view->getName().c_str());
editor->closePopup(); view->getWindowOpenState() = true;
ImGui::SetWindowFocus(view->getName().c_str());
editor->closePopup();
});
} }
if (lastMode != *s_searchMode) { if (lastMode != *s_searchMode) {