summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-08-12 14:40:07 +0100
committerDave Airlie <airlied@redhat.com>2011-08-12 14:40:07 +0100
commit27e0679ddc13e4596f185335548d479e281f92b0 (patch)
treec8d94d8ad668c5e55fbe67109b0a28bc22f3f6a9
parenta26272ebf2e16363fecd185890aeddc2ea8f10af (diff)
drv: fix GC null check
-rw-r--r--drv/impedgc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drv/impedgc.c b/drv/impedgc.c
index 0f7224eeb..721b0aa07 100644
--- a/drv/impedgc.c
+++ b/drv/impedgc.c
@@ -477,7 +477,6 @@ impedCopyNtoN (DrawablePtr pSrcDrawable,
PixmapPtr pDstPixmap = (PixmapPtr)GetDrawablePixmap(pDstDrawable);
int i;
DrvGCPtr pDrvGC = NULL;
- impedGCPrivPtr imped_gc = impedGetGC(pGC);
impedPixmapPrivPtr imped_src_pixmap = impedGetPixmap(pSrcPixmap);
impedPixmapPrivPtr imped_dst_pixmap = impedGetPixmap(pDstPixmap);
impedScreenPrivPtr imped_src_screen = impedGetScreen(pSrcPixmap->drawable.pScreen);
@@ -497,8 +496,10 @@ impedCopyNtoN (DrawablePtr pSrcDrawable,
pbox[i].y2 -= pDstPixmap->screen_y;
}
}
- if (pGC)
+ if (pGC) {
+ impedGCPrivPtr imped_gc = impedGetGC(pGC);
pDrvGC = imped_gc->gpu[0];
+ }
copy(imped_src_pixmap->gpu[0], imped_dst_pixmap->gpu[0],
pDrvGC, pbox, nbox, dx, dy, reverse,