зеркало из https://github.com/mozilla/gecko-dev.git
Bug 958723 - Check for valid FB first. - r=gabadie
This commit is contained in:
Родитель
b22fb48408
Коммит
50b8293e47
|
@ -1343,6 +1343,11 @@ WebGLContext::GetFramebufferAttachmentParameter(JSContext* cx,
|
|||
return JS::NullValue();
|
||||
}
|
||||
|
||||
if (!mBoundFramebuffer) {
|
||||
ErrorInvalidOperation("getFramebufferAttachmentParameter: cannot query framebuffer 0");
|
||||
return JS::NullValue();
|
||||
}
|
||||
|
||||
if (attachment != LOCAL_GL_DEPTH_ATTACHMENT &&
|
||||
attachment != LOCAL_GL_STENCIL_ATTACHMENT &&
|
||||
attachment != LOCAL_GL_DEPTH_STENCIL_ATTACHMENT)
|
||||
|
@ -1365,11 +1370,6 @@ WebGLContext::GetFramebufferAttachmentParameter(JSContext* cx,
|
|||
}
|
||||
}
|
||||
|
||||
if (!mBoundFramebuffer) {
|
||||
ErrorInvalidOperation("getFramebufferAttachmentParameter: cannot query framebuffer 0");
|
||||
return JS::NullValue();
|
||||
}
|
||||
|
||||
MakeContextCurrent();
|
||||
|
||||
const WebGLFramebuffer::Attachment& fba = mBoundFramebuffer->GetAttachment(attachment);
|
||||
|
|
Загрузка…
Ссылка в новой задаче