1
0
mirror of synced 2024-11-28 09:30:51 +01:00

fix: Crash when closing certain popups

This commit is contained in:
WerWolv 2022-01-11 20:29:06 +01:00
parent 1b853c6a84
commit 1a9bd12af0

View File

@ -528,10 +528,12 @@ namespace hex {
}
if (view->getWindowOpenState()) {
bool hasWindow = ImGui::FindWindowByName(View::toWindowName(view->getUnlocalizedName()).c_str()) != nullptr;
auto window = ImGui::FindWindowByName(View::toWindowName(view->getUnlocalizedName()).c_str());
bool hasWindow = window != nullptr;
bool focused = false;
if (hasWindow) {
if (hasWindow && !(window->Flags & ImGuiWindowFlags_Popup)) {
ImGui::Begin(View::toWindowName(view->getUnlocalizedName()).c_str());
focused = ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows);