summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <joel@joel-desktop.(none)>2008-01-19 17:39:44 +0900
committerJoel Bosveld <joel@joel-desktop.(none)>2008-01-19 17:39:44 +0900
commitb349b226a165e91b905d00f66f61e8151bd54075 (patch)
tree716470faafda855155efe7584fa789a2ab6435c2
parenta27ab5e6206f8e43042a1498dd724ad0211e25af (diff)
downloadcubedbus-b349b226a165e91b905d00f66f61e8151bd54075.tar.gz
cubedbus-b349b226a165e91b905d00f66f61e8151bd54075.tar.bz2
Delete data sets when destroying a particle
-rw-r--r--particleFx/death.c.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/particleFx/death.c.in b/particleFx/death.c.in
index 009d17d..d105626 100644
--- a/particleFx/death.c.in
+++ b/particleFx/death.c.in
@@ -4,9 +4,17 @@ static void
compFxParticleDestroy (CompFxParticle *particle)
{
particle->emitter->nParticles--;
-
- /* XXX free data sets XXX */
-
+
+ int i;
+
+ for(i=0; i<particle->nDataSets; i++)
+ {
+ free(particle->dataSets[i].name);
+ free(particle->dataSets[i].data);
+ }
+
+ free(particle->dataSets);
+
if(particle->prev == NULL) particle->emitter->head = particle->next;
else particle->prev->next = particle->next;