diff options
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/collada/BCAnimationCurve.cpp | 10 | ||||
-rw-r--r-- | source/blender/io/collada/BCAnimationSampler.cpp | 1 |
2 files changed, 9 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; diff --git a/source/blender/io/collada/BCAnimationSampler.cpp b/source/blender/io/collada/BCAnimationSampler.cpp index abc770ceef5..a6ee0b8bee6 100644 --- a/source/blender/io/collada/BCAnimationSampler.cpp +++ b/source/blender/io/collada/BCAnimationSampler.cpp @@ -448,6 +448,7 @@ void BCAnimationSampler::initialize_curves(BCAnimationCurveMap &curves, Object * char *boneName = BLI_str_quoted_substrN(fcu->rna_path, "pose.bones["); if (boneName) { object_type = BC_ANIMATION_TYPE_BONE; + MEM_freeN(boneName); } } |