mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 958723 - Check for valid FB first. - r=gabadie
This commit is contained in:
parent
a9e7191f08
commit
3b07bd07e9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user