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

Matthieu Herrb matthieu.herrb at laas.fr
Mon Jun 3 12:37:01 PDT 2013


falling back to software rendering for such source pictures
(solid/gradient).

Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
---
 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



More information about the xorg-devel mailing list