Bug 1096632 - Add a null check in case webgl app calls to glTexImage(<video>) while no frame inserted into ImageContainer. r=jgilbert

This commit is contained in:
chiajung hung 2014-11-11 19:29:00 -05:00
parent 8b1ccb3cec
commit 4309f4ca7c

View File

@ -1807,6 +1807,9 @@ WebGLContext::TexImageFromVideoElement(const TexImageTarget texImageTarget,
gl->MakeCurrent();
nsRefPtr<mozilla::layers::Image> srcImage = container->LockCurrentImage();
if (!srcImage)
return false;
WebGLTexture* tex = ActiveBoundTextureForTexImageTarget(texImageTarget);
const WebGLTexture::ImageInfo& info = tex->ImageInfoAt(texImageTarget, 0);