Skip to content

Commit

Permalink
Fixed crash on right-click without modal, introduced by previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Nov 17, 2021
1 parent a3667f4 commit 764f9e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3712,7 +3712,7 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
// Find the top-most window between HoveredWindow and the top-most Modal Window.
// This is where we can trim the popup stack.
ImGuiWindow* modal = GetTopMostPopupModal();
bool hovered_window_above_modal = g.HoveredWindow && IsWindowAbove(g.HoveredWindow, modal);
bool hovered_window_above_modal = g.HoveredWindow && (modal == NULL || IsWindowAbove(g.HoveredWindow, modal));
ClosePopupsOverWindow(hovered_window_above_modal ? g.HoveredWindow : modal, true);
}
}
Expand Down

0 comments on commit 764f9e6

Please sign in to comment.