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
This commit is contained in:
Lars Knoll 2006-03-06 21:00:09 +00:00
parent 448997ebcd
commit 0693083335
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2006-03-06 Lars Knoll <lars@trolltech.com>
* 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
2006-03-04 Matthieu Herrb <matthieu.herrb@laas.fr>
* hw/xfree86/dixmods/extmod/xf86misc.c
Only output SetClientVersion message if verbosity > 1, like other

View File

@ -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;

View File

@ -979,6 +979,7 @@ static PicturePtr createSourcePicture(void)
pPicture->pDrawable = 0;
pPicture->pFormat = 0;
pPicture->pNext = 0;
pPicture->devPrivates = 0;
SetPictureToDefaults(pPicture);
return pPicture;