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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-12-25 14:43:26 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-25 14:43:26 +0400
commit122e2b4bfa0211676042ba8e02570d1dcd2fc40d (patch)
tree109eb665c67d559d9f5a815f358f9e4f553c65c1 /source/blender/blenkernel/BKE_action.h
parentad0a3de3ce7f84486047b11343405072f0972107 (diff)
Fix T37709: Memory corruption when freeing custom bone shape objects
Summary: Issue was caused by access to pchan->custom object from channel free function when freeing all objects from main. Order of objects free is not defined and such an access might easily end up with access to freed memory. We don't need to do user counter stuff when freeing main, so added an _ex functions with do_id_user flag which is used when freeing main. We had the same issue with other datablocks, so now it should be easier to support relevant user counter. This issue was caused by the fix for T36391, so perhaps that's indeed high time to do real user counter. Reviewers: brecht, campbellbarton Reviewed By: campbellbarton Maniphest Tasks: T37709 Differential Revision: https://developer.blender.org/D137
Diffstat (limited to 'source/blender/blenkernel/BKE_action.h')
-rw-r--r--source/blender/blenkernel/BKE_action.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 3ac5c8c9a76..9068be970b5 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -134,13 +134,16 @@ void action_groups_clear_tempflags(struct bAction *act);
/* Pose API ----------------- */
void BKE_pose_channel_free(struct bPoseChannel *pchan);
+void BKE_pose_channel_free_ex(struct bPoseChannel *pchan, bool do_id_user);
void BKE_pose_channels_free(struct bPose *pose);
+void BKE_pose_channels_free_ex(struct bPose *pose, bool do_id_user);
void BKE_pose_channels_hash_make(struct bPose *pose);
void BKE_pose_channels_hash_free(struct bPose *pose);
void BKE_pose_free(struct bPose *pose);
+void BKE_pose_free_ex(struct bPose *pose, bool do_id_user);
void BKE_pose_copy_data(struct bPose **dst, struct bPose *src, const bool copy_constraints);
void BKE_pose_channel_copy_data(struct bPoseChannel *pchan, const struct bPoseChannel *pchan_from);
struct bPoseChannel *BKE_pose_channel_find_name(const struct bPose *pose, const char *name);