Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(889)

Unified Diff: ui/ozone/platform/dri/overlay_plane.cc

Issue 779173007: Fix crash when we don't have a plane to display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/dri/overlay_plane.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/overlay_plane.cc
diff --git a/ui/ozone/platform/dri/overlay_plane.cc b/ui/ozone/platform/dri/overlay_plane.cc
index c9e1ba0d67022e0af4e845b41f0d2ba77e15df3a..674586d00c2cbd4309c79da86c40930dbe7b37a6 100644
--- a/ui/ozone/platform/dri/overlay_plane.cc
+++ b/ui/ozone/platform/dri/overlay_plane.cc
@@ -32,15 +32,14 @@ OverlayPlane::~OverlayPlane() {
}
// static
-const OverlayPlane& OverlayPlane::GetPrimaryPlane(
+const OverlayPlane* OverlayPlane::GetPrimaryPlane(
const OverlayPlaneList& overlays) {
for (size_t i = 0; i < overlays.size(); ++i) {
if (overlays[i].z_order == 0)
- return overlays[i];
+ return &overlays[i];
}
- NOTREACHED();
- return overlays[0];
+ return nullptr;
}
} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/overlay_plane.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698