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:
Diffstat (limited to 'source/blender/io/collada/BCAnimationCurve.cpp')
-rw-r--r--source/blender/io/collada/BCAnimationCurve.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp
index 33eaf3376cd..5065accf554 100644
--- a/source/blender/io/collada/BCAnimationCurve.cpp
+++ b/source/blender/io/collada/BCAnimationCurve.cpp
@@ -173,8 +173,14 @@ std::string BCAnimationCurve::get_animation_name(Object *ob) const
name = "";
}
else {
- const char *boneName = BLI_str_quoted_substrN(fcurve->rna_path, "pose.bones[");
- name = (boneName) ? id_name(ob) + "_" + std::string(boneName) : "";
+ char *boneName = BLI_str_quoted_substrN(fcurve->rna_path, "pose.bones[");
+ if (boneName) {
+ name = id_name(ob) + "_" + std::string(boneName);
+ MEM_freeN(boneName);
+ }
+ else {
+ name = "";
+ }
}
} break;