diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-07-30 20:15:15 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-07-30 20:15:15 +0400 |
commit | 7f170c18bbc3ef3cc8e3b459b8bcc8a789ba0438 (patch) | |
tree | fe5309cec3fbc48191722296a66558edd75ce0e2 /source/gameengine/Converter/BL_ArmatureObject.cpp | |
parent | 2d3a57eaa3ce9237ca5334a8fbcd23b1b060739e (diff) |
Bugfixes: fix for two memory leaks related to dupligroups,
and a missing reference count in the trackto actuator. This
showed up as leaked pose data, but actually the whole object
was not being freed.
Diffstat (limited to 'source/gameengine/Converter/BL_ArmatureObject.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureObject.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index f73d5b42a01..09f1d9d4d87 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -82,10 +82,8 @@ void BL_ArmatureObject::ProcessReplica(BL_ArmatureObject *replica) BL_ArmatureObject::~BL_ArmatureObject() { - if (m_mrdPose){ - free_pose_channels(m_mrdPose); - MEM_freeN(m_mrdPose); - } + if (m_mrdPose) + free_pose(m_mrdPose); } /* note, you can only call this for exisiting Armature objects, and not mix it with other Armatures */ @@ -172,12 +170,13 @@ void BL_ArmatureObject::GetMRDPose(bPose **pose) // copy_pose (&m_mrdPose, m_pose, 0); //} - if (!*pose) + if (!*pose) { // must duplicate the constraints too otherwise we have corruption in free_pose_channels() // because it will free the blender constraints. // Ideally, blender should rememeber that the constraints were not copied so that // free_pose_channels() would not free them. copy_pose(pose, m_objArma->pose, 1); + } else extract_pose_from_pose(*pose, m_objArma->pose); |