about summary refs log tree commit diff
path: root/src/game/client/components/particles.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-11-24 01:08:51 +0100
committeroy <Tom_Adams@web.de>2010-11-24 01:08:51 +0100
commitbc5f3fc8396c7521bd261bc4ef69e52f6d91af12 (patch)
tree7e80692e43c9d45cee8b1fee1decc1b04af1cae5 /src/game/client/components/particles.cpp
parentebd45829ceac1d0e6b899fa9907c8188d07d27f8 (diff)
downloadzcatch-bc5f3fc8396c7521bd261bc4ef69e52f6d91af12.tar.gz
zcatch-bc5f3fc8396c7521bd261bc4ef69e52f6d91af12.zip
fixed client crash when there are lots of particles. Closes #105
Diffstat (limited to 'src/game/client/components/particles.cpp')
-rw-r--r--src/game/client/components/particles.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/client/components/particles.cpp b/src/game/client/components/particles.cpp
index 7aa8771c..ba6b13c7 100644
--- a/src/game/client/components/particles.cpp
+++ b/src/game/client/components/particles.cpp
@@ -50,7 +50,8 @@ void CParticles::Add(int Group, CParticle *pPart)
 	// remove from the free list
 	int Id = m_FirstFree;
 	m_FirstFree = m_aParticles[Id].m_NextPart;
-	m_aParticles[m_FirstFree].m_PrevPart = -1;
+	if(m_FirstFree != -1)
+		m_aParticles[m_FirstFree].m_PrevPart = -1;
 	
 	// copy data
 	m_aParticles[Id] = *pPart;