Fix [#29530] Changing to particle mode could crash in some cases
authorJanne Karhu <jhkarh@gmail.com>
Sun, 12 Feb 2012 00:32:31 +0000 (00:32 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Sun, 12 Feb 2012 00:32:31 +0000 (00:32 +0000)
* If a baked particle didn't have any cached keys creating an edit path for it crashed.

source/blender/blenkernel/intern/particle.c

index 8bd5b55..f0b0584 100644 (file)
@@ -3122,6 +3122,9 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
                if(edit->totcached && !(point->flag & PEP_EDIT_RECALC))
                        continue;
 
+               if(point->totkey == 0)
+                       continue;
+
                ekey = point->keys;
 
                pind.keyed = 0;