diff options
author | Dave Airlie <airlied@linux.ie> | 2008-12-03 16:51:25 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-12-03 16:55:31 -0800 |
commit | 293f6232c6c0ce12802a2123edfab4551d25e266 (patch) | |
tree | 55ba29a4383728870ddf41d2523ce939da406aec /uxa | |
parent | 457a680afd0d8f835131ea72be0c3c618c2892c7 (diff) |
uxa: don't call composite routines with no buffer.
We can get a case with gnome-terminal + links, where we get two arrays
of glyphs all with 0 width and 0 heights in them. If this happens
we manage to get to this case without any buffer setup and segfault.
(cherry picked from commit 717c7492a0f6ba3fb3eabda33515881eef314155)
Diffstat (limited to 'uxa')
-rw-r--r-- | uxa/uxa-glyphs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c index dc518568..dd26362e 100644 --- a/uxa/uxa-glyphs.c +++ b/uxa/uxa-glyphs.c @@ -858,13 +858,15 @@ uxa_glyphs (CARD8 op, } list++; } - - if (maskFormat) - uxa_glyphs_to_mask(pMask, &buffer); - else - uxa_glyphs_to_dst(op, pSrc, pDst, &buffer, - xSrc, ySrc, xDst, yDst); - + + if (buffer.count) { + if (maskFormat) + uxa_glyphs_to_mask(pMask, &buffer); + else + uxa_glyphs_to_dst(op, pSrc, pDst, &buffer, + xSrc, ySrc, xDst, yDst); + } + if (maskFormat) { x = extents.x1; |