diff options
Diffstat (limited to 'nx-X11/programs/Xserver/miext')
-rw-r--r-- | nx-X11/programs/Xserver/miext/cw/cw.h | 3 |
1 files changed, 2 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; |