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

Unified Diff: ui/gl/gl_surface_ozone.cc

Issue 1887563002: ozone: fix crash when running video decode unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/gl/gl_surface_ozone.cc
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
index da80397654374248b9305f0701a7c0ba0de7eaa5..3fe9b03f52dbacf0fc13f657c6a125e222e4021c 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -603,9 +603,11 @@ void GLSurfaceOzoneSurfacelessSurfaceImpl::Destroy() {
}
if (!was_current) {
- previous_context->MakeCurrent(previous_surface.get());
- } else {
- context_->ReleaseCurrent(this);
+ if (previous_context) {
spang 2016/04/13 14:00:49 Seems like it should be if (!was_current && previ
spang 2016/04/13 14:16:20 I guess it's fine the way it is, if you fall throu
+ previous_context->MakeCurrent(previous_surface.get());
+ } else {
+ context_->ReleaseCurrent(this);
+ }
}
}
« 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