diff options
Diffstat (limited to 'nx-X11/programs/Xserver/miext/cw')
-rw-r--r-- | nx-X11/programs/Xserver/miext/cw/cw.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/miext/cw/cw.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/miext/cw/cw.c b/nx-X11/programs/Xserver/miext/cw/cw.c index d9ca55f7e..a45c34dff 100644 --- a/nx-X11/programs/Xserver/miext/cw/cw.c +++ b/nx-X11/programs/Xserver/miext/cw/cw.c @@ -463,7 +463,7 @@ cwPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) DrawablePtr pBackingDrawable; int x_off, y_off, x_screen, y_screen; - while (pWin && pWin->backgroundState == ParentRelative) + while (pWin->backgroundState == ParentRelative) pWin = pWin->parent; pBackingDrawable = cwGetBackingDrawable((DrawablePtr)pWin, &x_off, 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; |