aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/miext/cw
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-12-07 07:23:20 +0100
committerMihai Moldovan <ionic@ionic.de>2017-12-07 07:23:20 +0100
commit5487d52fe1c37244c649c3aefb78600f08ffb91b (patch)
tree2d30b58a9044c67c5f844fa9bc424ef7faa4052a /nx-X11/programs/Xserver/miext/cw
parentc571aa9eda7d69b3de1647a208c685a971c9ad38 (diff)
parentaac4c5f590de3a6dacb01579848b25f6bdd3cc56 (diff)
downloadnx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.tar.gz
nx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.tar.bz2
nx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.zip
Merge branch 'uli42-pr/various_backports' into 3.6.x
Attributes GH PR #581: https://github.com/ArcticaProject/nx-libs/pull/581 Fixes: ArcticaProject/nx-libs#558 Fixes: ArcticaProject/nx-libs#541 Fixes: ArcticaProject/nx-libs#542
Diffstat (limited to 'nx-X11/programs/Xserver/miext/cw')
-rw-r--r--nx-X11/programs/Xserver/miext/cw/cw.c2
-rw-r--r--nx-X11/programs/Xserver/miext/cw/cw.h3
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;