mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 07:40:22 +01: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