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 authored and actondev committed Nov 26, 2021
1 parent 8496d44 commit 84829d6
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 84829d6

Please sign in to comment.