Commit f7c118ff authored by Brian Paul's avatar Brian Paul

st/mesa: fix glReadBuffer(GL_NONE) segfault

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73956
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
Tested-by: default avatarAhmed Allam <ahmabdabd@hotmail.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
parent 349efdbb
......@@ -700,7 +700,8 @@ st_ReadBuffer(struct gl_context *ctx, GLenum buffer)
(void) buffer;
/* add the renderbuffer on demand */
st_manager_add_color_renderbuffer(st, fb, fb->_ColorReadBufferIndex);
if (fb->_ColorReadBufferIndex >= 0)
st_manager_add_color_renderbuffer(st, fb, fb->_ColorReadBufferIndex);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment