[PATCH:xf86-video-mach64] Deal with pPict->pDrawable == NULL for source-only pictures.

Alex Deucher alexdeucher at gmail.com
Mon Jun 3 13:41:14 PDT 2013


On Mon, Jun 3, 2013 at 3:37 PM, Matthieu Herrb <matthieu.herrb at laas.fr> wrote:
> falling back to software rendering for such source pictures
> (solid/gradient).
>
> Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/atimach64render.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git src/atimach64render.c src/atimach64render.c
> index ffde2cb..8d259fa 100644
> --- src/atimach64render.c
> +++ src/atimach64render.c
> @@ -339,10 +339,13 @@ Mach64GetOrder(int val, int *shift)
>  static Bool
>  Mach64CheckTexture(PicturePtr pPict)
>  {
> -    int w = pPict->pDrawable->width;
> -    int h = pPict->pDrawable->height;
> +    int h,w;
>      int l2w, l2h, level, i;
>
> +    if (pPict->pDrawable == NULL)
> +           return FALSE;
> +    w = pPict->pDrawable->width;
> +    h = pPict->pDrawable->height;
>      for (i = 0; i < MACH64_NR_TEX_FORMATS; i++) {
>          if (Mach64TexFormats[i].pictFormat == pPict->format)
>              break;
> --
> 1.8.3
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list