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

Unified Diff: ui/ozone/platform/caca/ozone_platform_caca.cc

Issue 2346433002: Ozone caca: Fix segfault during GPU initialization (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/caca/ozone_platform_caca.cc
diff --git a/ui/ozone/platform/caca/ozone_platform_caca.cc b/ui/ozone/platform/caca/ozone_platform_caca.cc
index 53fab1b0c8bbf319a22c8123e1df6a3a415e1e5d..536a6d29ba2c696f0b06a7f87f45f0c479f92a8f 100644
--- a/ui/ozone/platform/caca/ozone_platform_caca.cc
+++ b/ui/ozone/platform/caca/ozone_platform_caca.cc
@@ -73,6 +73,12 @@ class OzonePlatformCaca : public OzonePlatform {
}
void InitializeGPU() override {
+ if (!window_manager_) {
+ // The return value of GetSurfaceFactoryOzone() must be non-null so a
+ // dummy instance of CacaWindowManager is needed to make the GPU
+ // initialization gracefully fail.
+ window_manager_.reset(new CacaWindowManager);
+ }
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698