summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-26 01:23:27 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-26 01:23:27 +0000
commit2b035305d1d8c06f2d0ac15e7eebd80dba52e9ea (patch)
treec22a310fc5d5f2c6789da950daa003d7e41c3e05
parentbe617d4a718b33e37b01843e163e42657fb14c51 (diff)
downloadchromium_src-2b035305d1d8c06f2d0ac15e7eebd80dba52e9ea.zip
chromium_src-2b035305d1d8c06f2d0ac15e7eebd80dba52e9ea.tar.gz
chromium_src-2b035305d1d8c06f2d0ac15e7eebd80dba52e9ea.tar.bz2
Don't crash when a context can't be created for HW video decode.
BUG=139061 Review URL: https://chromiumcodereview.appspot.com/10834019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148468 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/renderer/render_thread_impl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 9f3e580..9b5f3d9 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -772,6 +772,8 @@ RenderThreadImpl::GetGpuVDAContext3D() {
this, WebKit::WebGraphicsContext3D::Attributes(),
GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D")));
}
+ if (!gpu_vda_context3d_.get())
+ return base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>();
return gpu_vda_context3d_->AsWeakPtr();
}