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

Unified Diff: content/common/gpu/media/android_deferred_rendering_backing_strategy.cc

Issue 1632793002: Add missing null check to AVDA deferred rendering shutdown path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ran cl format Created 4 years, 11 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: content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc b/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
index 0bec437888ff5b68ab2ec5459930bd9f975eacc3..660785eea904bd446524425b8be3917280b0562f 100644
--- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
+++ b/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
@@ -41,6 +41,10 @@ void AndroidDeferredRenderingBackingStrategy::Initialize(
void AndroidDeferredRenderingBackingStrategy::Cleanup(
bool have_context,
const AndroidVideoDecodeAccelerator::OutputBufferMap& buffers) {
+ // If we failed before Initialize, then do nothing.
+ if (!shared_state_)
+ return;
+
// Make sure that no PictureBuffer textures refer to the SurfaceTexture or to
// the service_id that we created for it.
for (const std::pair<int, media::PictureBuffer>& entry : buffers)
« 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