Skip to content

Commit 9f6aae3

Browse files
committed
Nav: Fixed race condition pressing Esc during popup opening frame causing crash.
1 parent bd2355a commit 9f6aae3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imgui.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10859,7 +10859,7 @@ static void ImGui::NavUpdateCancelRequest()
1085910859
SetNavID(child_window->ChildId, ImGuiNavLayer_Main, 0, WindowRectAbsToRel(parent_window, child_rect));
1086010860
NavRestoreHighlightAfterMove();
1086110861
}
10862-
else if (g.OpenPopupStack.Size > 0 && !(g.OpenPopupStack.back().Window->Flags & ImGuiWindowFlags_Modal))
10862+
else if (g.OpenPopupStack.Size > 0 && g.OpenPopupStack.back().Window != NULL && !(g.OpenPopupStack.back().Window->Flags & ImGuiWindowFlags_Modal))
1086310863
{
1086410864
// Close open popup/menu
1086510865
ClosePopupToLevel(g.OpenPopupStack.Size - 1, true);

0 commit comments

Comments
 (0)