diff options
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/miext/cw/cw.h | 3 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/picture.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/miext/cw/cw.h b/nx-X11/programs/Xserver/miext/cw/cw.h index de4746be6..b8792661f 100644 --- a/nx-X11/programs/Xserver/miext/cw/cw.h +++ b/nx-X11/programs/Xserver/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 = (void *) (p)) extern int cwPictureIndex; diff --git a/nx-X11/programs/Xserver/render/picture.c b/nx-X11/programs/Xserver/render/picture.c index e82319bc9..eba042903 100644 --- a/nx-X11/programs/Xserver/render/picture.c +++ b/nx-X11/programs/Xserver/render/picture.c @@ -982,6 +982,7 @@ static PicturePtr createSourcePicture(void) pPicture->pDrawable = 0; pPicture->pFormat = 0; pPicture->pNext = 0; + pPicture->devPrivates = 0; SetPictureToDefaults(pPicture); return pPicture; |