Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win: fix can not find primary monitor crash #166

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion ui/display/win/screen_win.cc
Expand Up @@ -367,7 +367,9 @@ std::vector<ScreenWinDisplay> DisplayInfosToScreenWinDisplays(
display_infos_remaining, [](const internal::DisplayInfo& display_info) {
return display_info.screen_rect().origin().IsOrigin();
});
DCHECK(primary_display_iter != display_infos_remaining.end());
if (primary_display_iter == display_infos_remaining.end()) {
return {};
}

// Build the tree and determine DisplayPlacements along the way.
DisplayLayoutBuilder builder(primary_display_iter->id());
Expand Down