Index: ui/ozone/platform/drm/gpu/drm_device_manager.cc |
diff --git a/ui/ozone/platform/drm/gpu/drm_device_manager.cc b/ui/ozone/platform/drm/gpu/drm_device_manager.cc |
index 27d98f926fc0332fb46b361ea8d2182570cd1541..afd6660d34b622ecefc29d1590d56652e1fc1db5 100644 |
--- a/ui/ozone/platform/drm/gpu/drm_device_manager.cc |
+++ b/ui/ozone/platform/drm/gpu/drm_device_manager.cc |
@@ -90,12 +90,12 @@ scoped_refptr<DrmDevice> DrmDeviceManager::GetDrmDevice( |
return primary_device_; |
auto it = drm_device_map_.find(widget); |
- DCHECK(it != drm_device_map_.end()) |
+ DLOG_IF(WARNING, it == drm_device_map_.end()) |
<< "Attempting to get device for unknown widget " << widget; |
// If the widget isn't associated with a display (headless mode) we can |
// allocate buffers from any controller since they will never be scanned out. |
// Use the primary DRM device as a fallback when allocating these buffers. |
- if (!it->second) |
+ if (it == drm_device_map_.end() || !it->second) |
return primary_device_; |
return it->second; |