From 816606b9eabee334ce6e0b79e8aa67544f428c19 Mon Sep 17 00:00:00 2001 From: David Reveman Date: Fri, 11 Mar 2005 12:26:20 +0000 Subject: [PATCH] Return early from xglFillRect when no rectangles should be filled --- hw/xgl/xglfill.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xgl/xglfill.c b/hw/xgl/xglfill.c index 7832df27e..573484782 100644 --- a/hw/xgl/xglfill.c +++ b/hw/xgl/xglfill.c @@ -178,6 +178,9 @@ xglFillRect (DrawablePtr pDrawable, } } + if (!nBox) + return; + pBox = (heapBox) ? heapBox : stackBox; if (!xglFill (pDrawable, pGC, NULL, @@ -206,7 +209,7 @@ xglFillRect (DrawablePtr pDrawable, FatalError (XGL_SW_FAILURE_STRING); break; } - + REGION_INIT (pGC->pScreen, ®ion, pBox, nBox); while (nBox--)