summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@XPS-FEDORA.(none)>2009-08-22 14:48:13 +0800
committerSam Spilsbury <smspillaz@XPS-FEDORA.(none)>2009-08-22 14:48:13 +0800
commit5015b34766915ad543ded249172e12f28d4c9a7e (patch)
tree2a23fa7879e9151f58ded1c05a06740d5fbcfeec
parent2e59aa29edf916ca4f4cbe1f1a7331af98a4bd0c (diff)
downloadparticlesystem-5015b34766915ad543ded249172e12f28d4c9a7e.tar.gz
particlesystem-5015b34766915ad543ded249172e12f28d4c9a7e.tar.bz2
Set cache's to NULL to prevent pointers to free'd blocksHEADmaster
-rw-r--r--src/particlesystem.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/particlesystem.cpp b/src/particlesystem.cpp
index 274b319..2539821 100644
--- a/src/particlesystem.cpp
+++ b/src/particlesystem.cpp
@@ -303,16 +303,28 @@ ParticleSystem::finiParticles ()
glDeleteTextures (1, &tex);
if (vertices_cache)
+ {
free (vertices_cache);
+ vertices_cache = NULL;
+ }
if (colors_cache)
+ {
free (colors_cache);
+ colors_cache = NULL;
+ }
if (coords_cache)
+ {
free (coords_cache);
+ coords_cache = NULL;
+ }
if (dcolors_cache)
+ {
free (dcolors_cache);
+ dcolors_cache = NULL;
+ }
}
ParticleSystemScreen::ParticleSystemScreen (CompScreen *) :