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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 1916663002: Add null check to WebGLRenderingContextBase::contextGL(). (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: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index da5ee5d11ec794e67e0215e880d68fbc40e50abc..488589a9e5b6726333bad6daa586c9796c84d0cb 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -380,7 +380,13 @@ public:
void loseContextImpl(LostContextMode, AutoRecoveryMethod);
WebGraphicsContext3D* webContext() const { return drawingBuffer()->context(); }
- gpu::gles2::GLES2Interface* contextGL() const { return drawingBuffer()->contextGL(); }
+ gpu::gles2::GLES2Interface* contextGL() const
+ {
+ DrawingBuffer* d = drawingBuffer();
+ if (!d)
+ return nullptr;
+ return d->contextGL();
+ }
WebGLContextGroup* contextGroup() const { return m_contextGroup.get(); }
Extensions3DUtil* extensionsUtil();
« 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