From 70c3d27465714b09cb419dd3bbebfa2edad5573a Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 1 Jul 2014 07:05:16 +0000 Subject: [PATCH] fix a potential crash. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4706 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_tent.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c index 859b61628..965f16296 100644 --- a/engine/client/cl_tent.c +++ b/engine/client/cl_tent.c @@ -454,8 +454,10 @@ void CL_ClearTEntParticleState (void) int i; for (i = 0; i < cl_beams_max; i++) { - P_DelinkTrailstate(&(cl_beams[i].trailstate)); - P_DelinkTrailstate(&(cl_beams[i].emitstate)); + if (cl_beams[i].trailstate) + P_DelinkTrailstate(&(cl_beams[i].trailstate)); + if (cl_beams[i].emitstate) + P_DelinkTrailstate(&(cl_beams[i].emitstate)); } }