summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-10-13 12:54:56 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-10-18 15:56:28 -0700
commit9025e443b49cd43149e6c9ee8fdca7ebd0a66acb (patch)
treeb5de6f756fc4f3793f615bef1600cb595aa829c1
parent4bcc5e78c04aaa6b126d562003ecffcb8235ab91 (diff)
Rootless: src drawable window can now be NULL
Fix a possible crash when pSrc->pDrawable is NULL. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> (cherry picked from commit 7e178ffbed7c8557faf8d471ad275aa2b0365e1d)
-rw-r--r--miext/rootless/rootlessScreen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 6be4312d2..7adbec80c 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -253,7 +253,7 @@ RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pMask->pDrawable : NULL;
}
- srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
+ srcWin = (pSrc->pDrawable && pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pSrc->pDrawable : NULL;
dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pDst->pDrawable : NULL;
@@ -293,7 +293,7 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
GlyphPtr glyph;
WindowPtr srcWin, dstWin;
- srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
+ srcWin = (pSrc->pDrawable && pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pSrc->pDrawable : NULL;
dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ?
(WindowPtr)pDst->pDrawable : NULL;