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:
authorNathan Letwory <nathan@blender.org>2020-02-06 19:57:36 +0300
committerNathan Letwory <nathan@blender.org>2020-02-06 19:57:36 +0300
commit49b66ad9147a41523eab6b4e579d282d66b9a70a (patch)
treefc37839a1aafaa98541e13eb572063762132acd1 /source/blender/blenkernel/intern/particle.c
parent807aefd6234f7349d1bef2579def24c8bba9f31f (diff)
parentf8756554180e583ea765eca4e3931d1bda84ebd9 (diff)
Merge branch 'blender-v2.82-release' into master
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 7a352f8c9f8..d68c7a947ae 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -3638,12 +3638,14 @@ void object_remove_particle_system(Main *bmain, Scene *UNUSED(scene), Object *ob
}
}
- /* clear modifier */
+ /* Clear modifier, skip empty ones. */
psmd = psys_get_modifier(ob, psys);
- BLI_remlink(&ob->modifiers, psmd);
- modifier_free((ModifierData *)psmd);
+ if (psmd) {
+ BLI_remlink(&ob->modifiers, psmd);
+ modifier_free((ModifierData *)psmd);
+ }
- /* clear particle system */
+ /* Clear particle system. */
BLI_remlink(&ob->particlesystem, psys);
if (psys->part) {
id_us_min(&psys->part->id);