Commit e073093c authored by Lars Knoll's avatar Lars Knoll Committed by Mihai Moldovan

devPrivates fixes

Backported from X.Org: commit 0693083335185ce05ee64546151f3fc43ce98575 Author: Lars Knoll <lars@trolltech.com> Date: Mon Mar 6 21:00:09 2006 +0000 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 Backported-from-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 0a010adf
......@@ -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 = (void *) (p))
extern int cwPictureIndex;
......
......@@ -982,6 +982,7 @@ static PicturePtr createSourcePicture(void)
pPicture->pDrawable = 0;
pPicture->pFormat = 0;
pPicture->pNext = 0;
pPicture->devPrivates = 0;
SetPictureToDefaults(pPicture);
return pPicture;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment