Bug 1381610 - Check bindRenderbuffer called before framebufferRenderbuffer. r=jgilbert

This commit is contained in:
Samuel Vargas 2017-07-17 16:52:00 -04:00
parent ceca1e45b7
commit 107a8c4e5b

View File

@ -1389,8 +1389,17 @@ WebGLFramebuffer::FramebufferRenderbuffer(const char* funcName, GLenum attachEnu
}
// `rb`
if (rb && !mContext->ValidateObject("framebufferRenderbuffer: rb", *rb))
return;
if (rb) {
if (!mContext->ValidateObject("framebufferRenderbuffer: rb", *rb))
return;
if (!rb->mHasBeenBound) {
mContext->ErrorInvalidOperation("%s: bindRenderbuffer must be called before"
" attachment to %04x",
funcName, attachEnum);
return;
}
}
// End of validation.