From 7863212a94b4737176772654182fe35625da0052 Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Sun, 1 May 2011 21:46:04 +0000 Subject: [PATCH] fixes a memory problem with very small emission rates which might happen when a particle system has no more living particle. --- source/shared_lib/sources/graphics/particle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/shared_lib/sources/graphics/particle.cpp b/source/shared_lib/sources/graphics/particle.cpp index 9cfe6070..554608c8 100644 --- a/source/shared_lib/sources/graphics/particle.cpp +++ b/source/shared_lib/sources/graphics/particle.cpp @@ -1016,7 +1016,7 @@ void ParticleManager::update(int renderFps){ } if(showParticle == true){ ps->update(); - if(ps->isEmpty()){ + if(ps->isEmpty() && ps->getState() == ParticleSystem::sFade){ //delete ps; //*it= NULL; cleanupParticleSystemsList.push_back(ps);