From 74d3499f741bd9f878bf079f5adfd816cbbc5694 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 27 Oct 2001 20:52:33 +0000 Subject: [PATCH] fix a seg caused by my changes from last night --- libs/video/renderer/sw/sw_rpart.c | 3 ++- libs/video/renderer/sw32/sw32_rpart.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/video/renderer/sw/sw_rpart.c b/libs/video/renderer/sw/sw_rpart.c index 1b0c2b5e1..52feecd42 100644 --- a/libs/video/renderer/sw/sw_rpart.c +++ b/libs/video/renderer/sw/sw_rpart.c @@ -67,7 +67,8 @@ R_ClearParticles (void) for (i = 0; i < r_maxparticles; i++) particles[i].next = &particles[i + 1]; - particles[r_maxparticles - 1].next = NULL; + if (r_maxparticles) + particles[r_maxparticles - 1].next = NULL; } void diff --git a/libs/video/renderer/sw32/sw32_rpart.c b/libs/video/renderer/sw32/sw32_rpart.c index 141c4a8ed..4530d07d6 100644 --- a/libs/video/renderer/sw32/sw32_rpart.c +++ b/libs/video/renderer/sw32/sw32_rpart.c @@ -67,7 +67,8 @@ R_ClearParticles (void) for (i = 0; i < r_maxparticles; i++) particles[i].next = &particles[i + 1]; - particles[r_maxparticles - 1].next = NULL; + if (r_maxparticles) + particles[r_maxparticles - 1].next = NULL; } void