diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
commit | d568221710959cf7d783e6ff0fb80fb43a231124 (patch) | |
tree | 8d6f039393294c6ffac8533639afdebe5d68bfc1 /dix/pixmap.c | |
parent | 9508a382f8a9f241dab097d921b6d290c1c3a776 (diff) |
XFree86 4.3.0.1
Diffstat (limited to 'dix/pixmap.c')
-rw-r--r-- | dix/pixmap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dix/pixmap.c b/dix/pixmap.c index b65559f6e..fda07801c 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -26,6 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/programs/Xserver/dix/pixmap.c,v 3.5 2001/12/14 19:59:32 dawes Exp $ */ #include "X.h" #include "scrnintstr.h" @@ -65,10 +66,12 @@ GetScratchPixmapHeader(pScreen, width, height, depth, bitsPerPixel, devKind, /* width and height of 0 means don't allocate any pixmap data */ pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth); - if (pPixmap) + if (pPixmap) { if ((*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData)) return pPixmap; + (*pScreen->DestroyPixmap)(pPixmap); + } return NullPixmap; } @@ -132,7 +135,7 @@ AllocatePixmap(pScreen, pixDataSize) ptr = (char *)(ppriv + pScreen->PixmapPrivateLen); for (i = pScreen->PixmapPrivateLen; --i >= 0; ppriv++, sizes++) { - if (size = *sizes) + if ((size = *sizes) != 0) { ppriv->ptr = (pointer)ptr; ptr += size; |