6b2e48a
From 5ab230373909541945d373252a3f244b68a6f7af Mon Sep 17 00:00:00 2001
6b2e48a
From: Fedora X Ninjas <x@fedoraproject.org>
6b2e48a
Date: Mon, 6 Oct 2008 11:43:05 +1000
6b2e48a
Subject: [PATCH] exa: fix case where glyphs get flushed on last loop of previous cycle.
6b2e48a
6b2e48a
we segfault here in exaCompositeRects as we have no source as already
6b2e48a
flushed just before the loop finished.
6b2e48a
---
6b2e48a
 exa/exa_glyphs.c |   12 +++++++-----
6b2e48a
 1 files changed, 7 insertions(+), 5 deletions(-)
6b2e48a
6b2e48a
diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
6b2e48a
index b23e7f6..2efc42d 100644
6b2e48a
--- a/exa/exa_glyphs.c
6b2e48a
+++ b/exa/exa_glyphs.c
6b2e48a
@@ -872,11 +872,13 @@ exaGlyphs (CARD8 	 op,
6b2e48a
 	list++;
6b2e48a
     }
6b2e48a
     
6b2e48a
-    if (maskFormat)
6b2e48a
-	exaGlyphsToMask(pMask, &buffer);
6b2e48a
-    else
6b2e48a
-	exaGlyphsToDst(op, pSrc, pDst, &buffer,
6b2e48a
-		       xSrc, ySrc, xDst, yDst);
6b2e48a
+    if (buffer.count && buffer.source) {
6b2e48a
+        if (maskFormat)
6b2e48a
+	    exaGlyphsToMask(pMask, &buffer);
6b2e48a
+        else
6b2e48a
+	    exaGlyphsToDst(op, pSrc, pDst, &buffer,
6b2e48a
+		           xSrc, ySrc, xDst, yDst);
6b2e48a
+    }
6b2e48a
     
6b2e48a
     if (maskFormat)
6b2e48a
     {
6b2e48a
-- 
6b2e48a
1.5.5.1
6b2e48a