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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-09-23 16:39:33 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-09-23 16:39:33 +0300
commit06b51c64ad7cbf73dc0bc9c31060ffff0b778898 (patch)
tree11d5a2f8eacc610dd17353f783ae87452cc7854b /source/blender/editors/physics
parent1925b9b2fac4e637cc2e0e2053e25059c5098664 (diff)
Particles: Prevent crash when copying to an object with subsurf modifier
Probably something will be remapped wrongly, but better than crash.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/particle_object.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 895d791b8e2..4a4474868a2 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -697,6 +697,9 @@ static bool remap_hair_emitter(Scene *scene, Object *ob, ParticleSystem *psys,
dm = target_psmd->dm_deformed;
}
target_dm = target_psmd->dm_final;
+ if (dm == NULL) {
+ return false;
+ }
/* don't modify the original vertices */
dm = CDDM_copy(dm);
@@ -1078,7 +1081,7 @@ static bool copy_particle_systems_to_object(Main *bmain,
copy_particle_edit(scene, ob_to, psys, psys_from);
if (duplicate_settings) {
- id_us_min(psys->part);
+ id_us_min(&psys->part->id);
psys->part = BKE_particlesettings_copy(bmain, psys->part);
}
}