mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 765198 - WebGL crash in readPixels with null destination - r=bz
This commit is contained in:
parent
25b3d30c16
commit
fd19d43820
@ -3849,6 +3849,9 @@ WebGLContext::ReadPixels(WebGLint x, WebGLint y, WebGLsizei width,
|
||||
if (width < 0 || height < 0)
|
||||
return ErrorInvalidValue("readPixels: negative size passed");
|
||||
|
||||
if (!pixels)
|
||||
return ErrorInvalidValue("readPixels: null destination buffer");
|
||||
|
||||
const WebGLRectangleObject *framebufferRect = FramebufferRectangleObject();
|
||||
WebGLsizei framebufferWidth = framebufferRect ? framebufferRect->Width() : 0;
|
||||
WebGLsizei framebufferHeight = framebufferRect ? framebufferRect->Height() : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user