[Bf-blender-cvs] [5ac7675f4c9] master: Fix T62849: crash entering particle edit mode with hair dynamics

Brecht Van Lommel noreply at git.blender.org
Tue Apr 16 01:42:23 CEST 2019


Commit: 5ac7675f4c9c06b9c3b5598dff4b9ce1a7a56cbe
Author: Brecht Van Lommel
Date:   Tue Apr 16 01:41:37 2019 +0200
Branches: master
https://developer.blender.org/rB5ac7675f4c9c06b9c3b5598dff4b9ce1a7a56cbe

Fix T62849: crash entering particle edit mode with hair dynamics

===================================================================

M	source/blender/editors/physics/particle_edit.c

===================================================================

diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index bd78677bdb6..149dadedfb4 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -4798,8 +4798,11 @@ void PE_create_particle_edit(
 	edit = (psys) ? psys->edit : cache->edit;
 
 	if (!edit) {
-		ParticleSystem *psys_eval = psys_eval_get(depsgraph, ob, psys);
-		psys_copy_particles(psys, psys_eval);
+		ParticleSystem *psys_eval = NULL;
+		if (psys) {
+			psys_eval = psys_eval_get(depsgraph, ob, psys);
+			psys_copy_particles(psys, psys_eval);
+		}
 
 		totpoint = psys ? psys->totpart : (int)((PTCacheMem *)cache->mem_cache.first)->totpoint;



More information about the Bf-blender-cvs mailing list