summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-10-07 02:38:44 +1000
committerDave Airlie <airlied@linux.ie>2008-10-07 02:38:44 +1000
commit717c7492a0f6ba3fb3eabda33515881eef314155 (patch)
treeafa17fd74bfaa8dc5a2f4738652c6520bfc8e578
parentaacac3edac7c6b82a0a0e3bc500f563d187e5df3 (diff)
exa: 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.
-rw-r--r--exa/exa_glyphs.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 2acc891f3..169763f76 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -871,12 +871,14 @@ exaGlyphs (CARD8 op,
list++;
}
- if (maskFormat)
- exaGlyphsToMask(pMask, &buffer);
- else
- exaGlyphsToDst(op, pSrc, pDst, &buffer,
- xSrc, ySrc, xDst, yDst);
-
+ if (buffer.count) {
+ if (maskFormat)
+ exaGlyphsToMask(pMask, &buffer);
+ else
+ exaGlyphsToDst(op, pSrc, pDst, &buffer,
+ xSrc, ySrc, xDst, yDst);
+ }
+
if (maskFormat)
{
x = extents.x1;