File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,13 @@ std::vector<ScreenWinDisplay> DisplayInfosToScreenWinDisplays(
324324 display_infos_remaining, [](const internal::DisplayInfo& display_info) {
325325 return display_info.screen_rect ().origin ().IsOrigin ();
326326 });
327- DCHECK (primary_display_iter != display_infos_remaining.end ());
327+
328+ // If we can't find the primary display, we likely witnessed a race condition
329+ // when querying the OS for display info. We expect another OS notification to
330+ // trigger this lookup again soon, so just return an empty list for now.
331+ if (primary_display_iter == display_infos_remaining.end ()) {
332+ return {};
333+ }
328334
329335 // Build the tree and determine DisplayPlacements along the way.
330336 DisplayLayoutBuilder builder (primary_display_iter->id ());
You can’t perform that action at this time.
0 commit comments