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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-01-04 11:56:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-04 11:56:25 +0300
commit9cafe19c707971f916060f94c40660e6b65a30e3 (patch)
tree756d94eb7925de0b2120886f1fe87d61eba3610a
parenta735629fd17edd9c0919789dddabee71012fa6a5 (diff)
- use BKE_keyingset_free_path where paths were being freed inline.
- rna_path was being freed when null, printing errors.
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c7
-rw-r--r--source/blender/editors/animation/keyingsets.c7
-rw-r--r--source/blender/editors/space_outliner/outliner.c7
3 files changed, 8 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 1ddf6a73abd..abe5b50664f 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -916,10 +916,11 @@ void BKE_keyingset_free_path (KeyingSet *ks, KS_Path *ksp)
/* sanity check */
if ELEM(NULL, ks, ksp)
return;
-
+
/* free RNA-path info */
- MEM_freeN(ksp->rna_path);
-
+ if(ksp->rna_path)
+ MEM_freeN(ksp->rna_path);
+
/* free path itself */
BLI_freelinkN(&ks->paths, ksp);
}
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 09128672df8..433abc7d3d1 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -418,12 +418,9 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
/* try to find a path matching this description */
ksp= BKE_keyingset_find_path(ks, ptr.id.data, ks->name, path, index, KSP_GROUP_KSNAME);
-
+
if (ksp) {
- /* just free it... */
- MEM_freeN(ksp->rna_path);
- BLI_freelinkN(&ks->paths, ksp);
-
+ BKE_keyingset_free_path(ks, ksp);
success= 1;
}
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index b611322d7e9..799a4200ecf 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -4144,12 +4144,9 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
if (ksp) {
/* free path's data */
- // TODO: we probably need an API method for this
- if (ksp->rna_path) MEM_freeN(ksp->rna_path);
+ BKE_keyingset_free_path(ks, ksp);
+
ks->active_path= 0;
-
- /* remove path from set */
- BLI_freelinkN(&ks->paths, ksp);
}
}
break;