[Mesa-dev] [PATCH] st/mesa: fix glReadBuffer(GL_NONE) segfault
Marek Olšák
maraeo at gmail.com
Thu Jan 23 09:10:11 PST 2014
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Thu, Jan 23, 2014 at 5:50 PM, Brian Paul <brianp at vmware.com> wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73956
> Cc: 10.0 <mesa-stable at lists.freedesktop.org>
> Tested-by: Ahmed Allam <ahmabdabd at hotmail.com>
> ---
> src/mesa/state_tracker/st_cb_fbo.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
> index 637f7ee..eca04b8 100644
> --- a/src/mesa/state_tracker/st_cb_fbo.c
> +++ b/src/mesa/state_tracker/st_cb_fbo.c
> @@ -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);
> }
>
>
> --
> 1.7.10.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list