summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
authorLars Knoll <lars@trolltech.com>2006-03-06 21:00:09 +0000
committerLars Knoll <lars@trolltech.com>2006-03-06 21:00:09 +0000
commit0693083335185ce05ee64546151f3fc43ce98575 (patch)
tree6e8199f8d008d020e6de5a8c007bc36f3c131497 /miext
parent448997ebcd2bab02be1059b07b91b63b0d05d268 (diff)
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
Diffstat (limited to 'miext')
-rw-r--r--miext/cw/cw.h3
1 files changed, 2 insertions, 1 deletions
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;