diff options
author | Albert Damen <albrt@gmx.net> | 2009-10-25 18:02:07 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-26 11:36:52 -0700 |
commit | 10946118dd3a63f1375a1bfde0b2f0542a93c1c2 (patch) | |
tree | f4d2d960e6c940f86fffc07a06140ceb95849305 /uxa | |
parent | 751e0a3e4576bbf4bffa56bbd6d4de28f10db98e (diff) |
Fix crash in uxa_acquire_pattern when pDst is NULL
This avoids a crash when an XRenderComposite call is made with a
-1 value for width/height, (which apparently compiz's gtk-window-
decorator likes to do). Fixes bug:
X crashes in uxa_acquire_pattern when logging in (gdm)
http://bugs.freedesktop.org/show_bug.cgi?id=24724
Signed-off-by: Albert Damen <albrt@gmx.net>
Reviewed-by: Carl Worth <cworth@cworth.org>
Diffstat (limited to 'uxa')
-rw-r--r-- | uxa/uxa-render.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index 497c93d2..7c0dbe53 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -449,6 +449,8 @@ uxa_acquire_pattern(ScreenPtr pScreen, PicturePtr pDst; pDst = uxa_picture_for_pixman_format(pScreen, format, width, height); + if (!pDst) + return 0; if (uxa_prepare_access(pDst->pDrawable, UXA_ACCESS_RW)) { fbComposite(PictOpSrc, pSrc, NULL, pDst, x, y, 0, 0, 0, 0, width, height); |