summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/atimach64render.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/atimach64render.c b/src/atimach64render.c
index ffde2cb..8d259fa 100644
--- a/src/atimach64render.c
+++ b/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;