mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-22 15:46:35 +00:00
Nav: Fixed race condition pressing Esc during popup opening frame causing crash.
This commit is contained in:
parent
bd2355a047
commit
9f6aae3bf2
@ -10859,7 +10859,7 @@ static void ImGui::NavUpdateCancelRequest()
|
||||
SetNavID(child_window->ChildId, ImGuiNavLayer_Main, 0, WindowRectAbsToRel(parent_window, child_rect));
|
||||
NavRestoreHighlightAfterMove();
|
||||
}
|
||||
else if (g.OpenPopupStack.Size > 0 && !(g.OpenPopupStack.back().Window->Flags & ImGuiWindowFlags_Modal))
|
||||
else if (g.OpenPopupStack.Size > 0 && g.OpenPopupStack.back().Window != NULL && !(g.OpenPopupStack.back().Window->Flags & ImGuiWindowFlags_Modal))
|
||||
{
|
||||
// Close open popup/menu
|
||||
ClosePopupToLevel(g.OpenPopupStack.Size - 1, true);
|
||||
|
Loading…
Reference in New Issue
Block a user