[Mesa-dev] [PATCH 3/5] st/mesa: fix member access within null pointer

Nicolai Hähnle nhaehnle at gmail.com
Fri Feb 10 09:22:22 UTC 2017


On 07.02.2017 19:34, Bartosz Tomczyk wrote:
> ---
>  src/mesa/state_tracker/st_manager.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
> index c3d8286b5a..ad69ca6eb5 100644
> --- a/src/mesa/state_tracker/st_manager.c
> +++ b/src/mesa/state_tracker/st_manager.c
> @@ -488,7 +488,7 @@ static void
>  st_framebuffer_reference(struct st_framebuffer **ptr,
>                           struct st_framebuffer *stfb)
>  {
> -   struct gl_framebuffer *fb = &stfb->Base;
> +   struct gl_framebuffer *fb = stfb ? &stfb->Base : NULL;
>     _mesa_reference_framebuffer((struct gl_framebuffer **) ptr, fb);
>  }
>
>

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>




More information about the mesa-dev mailing list