diff options
author | Lars Knoll <lars@trolltech.com> | 2017-12-05 22:14:22 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-07 07:20:55 +0100 |
commit | e073093cc9ea46eb1740440d286c2874b98fd3ae (patch) | |
tree | 4ee6a0cd6ce40d389418b0337d75939d36b14a0c /nx-X11/programs/Xserver/miext/cw | |
parent | 0a010adfc2717200e3f2acf345ef2802cfaaa146 (diff) | |
download | nx-libs-e073093cc9ea46eb1740440d286c2874b98fd3ae.tar.gz nx-libs-e073093cc9ea46eb1740440d286c2874b98fd3ae.tar.bz2 nx-libs-e073093cc9ea46eb1740440d286c2874b98fd3ae.zip |
devPrivates fixes
Backported from X.Org:
commit 0693083335185ce05ee64546151f3fc43ce98575
Author: Lars Knoll <lars@trolltech.com>
Date: Mon Mar 6 21:00:09 2006 +0000
render/picture.c Correctly initialize devPrivates variable in source only
pictures to 0
miext/cw/cw.h Don't try to access devPrivates of source only pictures
Backported-from-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/programs/Xserver/miext/cw')
-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; |