[Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

samuel.pitoiset samuel.pitoiset at gmail.com
Tue Oct 20 10:04:06 PDT 2015


Is there a particular situation where nv50_miptree_from_handle() fails? 
And did you check nv50?

Anyway, this patch is:
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 20/10/2015 18:34, Julien Isorce wrote:
> Signed-off-by: Julien Isorce <j.isorce at samsung.com>
> ---
>   src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
> index 12b5a02..15c803c 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
> @@ -26,7 +26,8 @@ nvc0_resource_from_handle(struct pipe_screen * screen,
>      } else {
>         struct pipe_resource *res = nv50_miptree_from_handle(screen,
>                                                              templ, whandle);
> -      nv04_resource(res)->vtbl = &nvc0_miptree_vtbl;
> +      if (res)
> +         nv04_resource(res)->vtbl = &nvc0_miptree_vtbl;
>         return res;
>      }
>   }



More information about the mesa-dev mailing list