fix for using freed memory with animation/group/ungroup code.

This commit is contained in:
2011-01-08 11:08:51 +00:00
parent d3d5fe42bf
commit 39e7848ca1

View File

@@ -551,7 +551,7 @@ bNode *nodeMakeGroupFromSelected(bNodeTree *ntree)
BKE_animdata_separate_by_basepath(&ntree->id, &ngroup->id, &anim_basepaths);
/* paths + their wrappers need to be freed */
for (ld = anim_basepaths.first; ld; ld = ld->next) {
for (ld = anim_basepaths.first; ld; ld = ldn) {
ldn = ld->next;
MEM_freeN(ld->data);
@@ -866,7 +866,7 @@ int nodeGroupUnGroup(bNodeTree *ntree, bNode *gnode)
BKE_animdata_separate_by_basepath(&wgroup->id, &ntree->id, &anim_basepaths);
/* paths + their wrappers need to be freed */
for (ld = anim_basepaths.first; ld; ld = ld->next) {
for (ld = anim_basepaths.first; ld; ld = ldn) {
ldn = ld->next;
MEM_freeN(ld->data);