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
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-04-18 15:43:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-04-18 15:43:45 +0300
commit6f087be9f97d6e4b8637b297322438cf23491cae (patch)
tree846175438786cb5c0542ec7cb5bbb3916db9fa23 /source
parent5cfeba72f117b7dc6d6eba22e3f203fc3f574429 (diff)
Fix T63590: Blender crashes when deleting particle hair keys
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/physics/particle_edit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index d592bbd82b1..6f6f78fc321 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -2728,7 +2728,7 @@ static int remove_tagged_particles(Object *ob, ParticleSystem *psys, int mirror)
return removed;
}
-static void remove_tagged_keys(Object *ob, ParticleSystem *psys)
+static void remove_tagged_keys(Depsgraph *depsgraph, Object *ob, ParticleSystem *psys)
{
PTCacheEdit *edit = psys->edit;
ParticleData *pa;
@@ -2736,12 +2736,13 @@ static void remove_tagged_keys(Object *ob, ParticleSystem *psys)
POINT_P;
KEY_K;
PTCacheEditKey *nkey, *new_keys;
- ParticleSystemModifierData *psmd_eval;
short new_totkey;
if (pe_x_mirror(ob)) {
/* mirror key tags */
- psmd_eval = psys_get_modifier(ob, psys);
+ ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
+ ParticleSystemModifierData *psmd_eval = (ParticleSystemModifierData *)modifier_get_evaluated(
+ depsgraph, ob, &psmd->modifier);
LOOP_POINTS
{
@@ -3187,7 +3188,7 @@ static int delete_exec(bContext *C, wmOperator *op)
if (type == DEL_KEY) {
foreach_selected_key(&data, set_delete_particle_key);
- remove_tagged_keys(data.ob, data.edit->psys);
+ remove_tagged_keys(data.depsgraph, data.ob, data.edit->psys);
recalc_lengths(data.edit);
}
else if (type == DEL_PARTICLE) {