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

Unified Diff: ui/ozone/platform/drm/gpu/drm_thread.cc

Issue 2903353002: Make ozone/drm/mojo more immune to startup races (Closed)
Patch Set: Created 3 years, 7 months 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
Index: ui/ozone/platform/drm/gpu/drm_thread.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_thread.cc b/ui/ozone/platform/drm/gpu/drm_thread.cc
index 8eaaeee1deb0a83efeccac5a07ad8781784f111c..1dd66d870da6b3490da874fcc504591cd9a1492f 100644
--- a/ui/ozone/platform/drm/gpu/drm_thread.cc
+++ b/ui/ozone/platform/drm/gpu/drm_thread.cc
@@ -207,8 +207,10 @@ void DrmThread::SetCursor(const gfx::AcceleratedWidget& widget,
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& location,
int32_t frame_delay_ms) {
- screen_manager_->GetWindow(widget)
- ->SetCursor(bitmaps, location, frame_delay_ms);
+ auto window = screen_manager_->GetWindow(widget);
dnicoara 2017/05/26 15:51:04 Why is this needed? The window lifetime is "manage
+ if (!window)
+ return;
+ window->SetCursor(bitmaps, location, frame_delay_ms);
}
void DrmThread::MoveCursor(const gfx::AcceleratedWidget& widget,
« no previous file with comments | « no previous file | ui/ozone/platform/drm/mus_thread_proxy.cc » ('j') | ui/ozone/platform/drm/ozone_platform_gbm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698