summaryrefslogtreecommitdiffstats
path: root/webkit/gpu
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-10 00:41:43 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-10 00:41:43 +0000
commit2010f8ba65ab51eb68ecbc15ef026fd6a66cb884 (patch)
tree50346973769fa991a63a4eb0908a11fd02b0d61b /webkit/gpu
parenta39a60e298ef392620502b3b94f2ead7a5ed66f0 (diff)
downloadchromium_src-2010f8ba65ab51eb68ecbc15ef026fd6a66cb884.zip
chromium_src-2010f8ba65ab51eb68ecbc15ef026fd6a66cb884.tar.gz
chromium_src-2010f8ba65ab51eb68ecbc15ef026fd6a66cb884.tar.bz2
NULL check context_impl since it might be null
BUG=117520 TEST=none (I think this code is unreachable in chromium) Review URL: http://codereview.chromium.org/9663019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125961 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index 8f50137..5b39a84 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -125,13 +125,14 @@ WebGraphicsContext3DInProcessImpl::CreateForWebView(
if (!gfx::GLSurface::InitializeOneOff())
return NULL;
- gfx::GLShareGroup* share_group = 0;
+ gfx::GLShareGroup* share_group = NULL;
if (attributes.shareResources) {
WebGraphicsContext3DInProcessImpl* context_impl =
g_all_shared_contexts.Pointer()->empty() ?
NULL : *g_all_shared_contexts.Pointer()->begin();
- share_group = context_impl->gl_context_->share_group();
+ if (context_impl)
+ share_group = context_impl->gl_context_->share_group();
}
// This implementation always renders offscreen regardless of whether