From 0693083335185ce05ee64546151f3fc43ce98575 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 6 Mar 2006 21:00:09 +0000 Subject: render/picture.c Correctly initialize devPrivates variable in source only pictures to 0 miext/cw/cw.h Don't try to access devPrivates of source only pictures --- miext/cw/cw.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'miext') diff --git a/miext/cw/cw.h b/miext/cw/cw.h index 167308eb6..09cfc7828 100644 --- a/miext/cw/cw.h +++ b/miext/cw/cw.h @@ -60,7 +60,8 @@ typedef struct { unsigned long stateChanges; } cwPictureRec, *cwPicturePtr; -#define getCwPicture(pPicture) ((cwPicturePtr)(pPicture)->devPrivates[cwPictureIndex].ptr) +#define getCwPicture(pPicture) \ + (pPicture->pDrawable ? (cwPicturePtr)(pPicture)->devPrivates[cwPictureIndex].ptr : 0) #define setCwPicture(pPicture,p) ((pPicture)->devPrivates[cwPictureIndex].ptr = (pointer) (p)) extern int cwPictureIndex; -- cgit v1.2.3