Fix for bug #6753: metaballs instanced by a particle system did not
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 12 Apr 2008 14:30:17 +0000 (14:30 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 12 Apr 2008 14:30:17 +0000 (14:30 +0000)
refresh properly, also fixed a memory leak.

source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/scene.c

index ab6cf070a807d2782abb47134ce5b7214c425c9c..f9687880d16ebdbb09e4f1f7b9741a995ca04edb 100644 (file)
@@ -610,6 +610,8 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int
                        if(part->draw_as == PART_DRAW_OB && part->dup_ob) {
                                node2 = dag_get_node(dag, part->dup_ob);
                                dag_add_relation(dag, node, node2, DAG_RL_OB_OB);
+                               if(part->dup_ob->type == OB_MBALL)
+                                       dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA);
                        }
 
                        if(part->draw_as == PART_DRAW_GR && part->dup_group) {
index 216ad101569e3ec7406a36befa73ff2987acdcf0..1f5b8c731e00371632fe3cb173b1254247f2a839 100644 (file)
@@ -426,6 +426,9 @@ int next_object(int val, Base **base, Object **ob)
                                                        duplilist= object_duplilist(G.scene, (*base)->object);
                                                        
                                                        dupob= duplilist->first;
+
+                                                       if(!dupob)
+                                                               free_object_duplilist(duplilist);
                                                }
                                        }
                                }