summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-03 17:17:22 -0700
committerBrian <[email protected]>2008-01-05 15:45:55 -0700
commit48aa35a8b28e2cd5dab994c2cc0d728275b9aad2 (patch)
tree3460aa945f15612fac4b45e3064bf05c02eab46b /src/mesa/swrast
parente7044d552c6d16389447880b8744a51de1cf0199 (diff)
check if span length > 0 before calling _swrast_write_rgba_span()
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_points.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index d60e175baa0..350a0682d69 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -499,11 +499,13 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
if (span->end >= MAX_WIDTH ||
(swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT)) ||
span->facing != swrast->PointLineFacing) {
- if (ciMode)
- _swrast_write_index_span(ctx, span);
- else
- _swrast_write_rgba_span(ctx, span);
- span->end = 0;
+ if (span->end > 0) {
+ if (ciMode)
+ _swrast_write_index_span(ctx, span);
+ else
+ _swrast_write_rgba_span(ctx, span);
+ span->end = 0;
+ }
}
count = span->end;