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>2015-09-11 12:12:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-09-11 12:12:54 +0300
commitbb20c96da562a294f3f606ca6db446389d6765cb (patch)
tree58aaf909bc8d9af492f8c59a6298aa6f02e3a516 /source/blender/collada/AnimationImporter.cpp
parent42825dc1fc03609efed30259fa69cc31819be31c (diff)
Fix memory leaks in collada import
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r--source/blender/collada/AnimationImporter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index dbff917d2c1..1bcf51f9d1f 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -898,8 +898,6 @@ void AnimationImporter::translate_Animations(COLLADAFW::Node *node,
std::multimap<COLLADAFW::UniqueId, Object *>& object_map,
std::map<COLLADAFW::UniqueId, const COLLADAFW::Object *> FW_object_map)
{
- AnimationImporter::AnimMix *animType = get_animation_type(node, FW_object_map);
-
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
COLLADAFW::UniqueId uid = node->getUniqueId();
COLLADAFW::Node *root = root_map.find(uid) == root_map.end() ? node : root_map[uid];
@@ -915,6 +913,8 @@ void AnimationImporter::translate_Animations(COLLADAFW::Node *node,
return;
}
+
+ AnimationImporter::AnimMix *animType = get_animation_type(node, FW_object_map);
bAction *act;
if ( (animType->transform) != 0) {
@@ -1116,6 +1116,8 @@ void AnimationImporter::translate_Animations(COLLADAFW::Node *node,
}
}
}
+
+ delete animType;
}
void AnimationImporter::add_bone_animation_sampled(Object *ob, std::vector<FCurve *>& animcurves, COLLADAFW::Node *root, COLLADAFW::Node *node, COLLADAFW::Transformation *tm)