Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-01-03 07:35:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-03 07:35:51 +0300
commitbf6fc751612c6a1ecef0573761a61daab9dc2983 (patch)
treede778b6771f6d207da2348835a55ebcb32fb345f /source/blender/blenkernel
parenteb7ac3146e1cee6c1246c3772e11538c253559a0 (diff)
freeing particle modifier would access freed memory (only to tak the psys to be deleted), set to NULL after freeing and check before tagging.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/modifier.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index e0640a76f43..79fc117b4de 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -6866,7 +6866,10 @@ static void particleSystemModifier_freeData(ModifierData *md)
psmd->dm=0;
}
- psmd->psys->flag |= PSYS_DELETE;
+ /* ED_object_modifier_remove may have freed this first before calling
+ * modifier_free (which calls this function) */
+ if(psmd->psys)
+ psmd->psys->flag |= PSYS_DELETE;
}
static void particleSystemModifier_copyData(ModifierData *md, ModifierData *target)
{