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

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

Issue 2335263002: Fix crash in canvas.toBlob caused by allocation failure (Closed)
Patch Set: fix++ Created 4 years, 3 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 | « third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp ('k') | 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.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 1113e5d4ab6c4b70651e21ca82343c625e1d59b7..4a111e61cb7b2e8f66d5ad11de00a65a803ad417 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -4264,7 +4264,7 @@ void WebGLRenderingContextBase::texImageCanvasByGPU(HTMLCanvasElement* canvas, G
{
if (!canvas->is3D()) {
ImageBuffer* buffer = canvas->buffer();
- if (!buffer->copyToPlatformTexture(contextGL(), targetTexture, targetInternalformat, targetType,
+ if (buffer && !buffer->copyToPlatformTexture(contextGL(), targetTexture, targetInternalformat, targetType,
targetLevel, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
NOTREACHED();
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698