summaryrefslogtreecommitdiff
path: root/render/picturestr.h
diff options
context:
space:
mode:
Diffstat (limited to 'render/picturestr.h')
-rw-r--r--render/picturestr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/render/picturestr.h b/render/picturestr.h
index da69ff601..5c6c41e23 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -407,7 +407,7 @@ extern _X_EXPORT RESTYPE PictFormatType;
extern _X_EXPORT RESTYPE GlyphSetType;
#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
-#define GetPictureScreenIfSet(s) GetPictureScreen(s)
+#define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL)
#define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
#define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
#define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)