From d568221710959cf7d783e6ff0fb80fb43a231124 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Fri, 14 Nov 2003 16:49:22 +0000 Subject: XFree86 4.3.0.1 --- dix/pixmap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dix/pixmap.c') 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; -- cgit v1.2.3