aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/miext/cw/cw.h
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/cw.h
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/cw.h')
-rw-r--r--nx-X11/programs/Xserver/miext/cw/cw.h3
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;