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>2012-09-14 10:17:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-14 10:17:14 +0400
commit7a71f58af3b5f70e8982d827d1fef7e8bc4e4ec8 (patch)
treeae5ee3e8c3a1d029e54531bbfd5ac8db42d9f7d9 /source/blender/editors/armature
parent3957efdd38d0d5136f8d106de3a79e07b7b0b15f (diff)
fixes for NULL checks, remove some redundant checks and add some in that have been removed by accident as code has been updated.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/poseobject.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index e4f1e6d3e8b..e9424a08b0c 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -2350,20 +2350,18 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op)
for (pchan = dummyPose->chanbase.first; pchan; pchan = pchan->next) {
pose_bone_do_paste(ob, pchan, only_select, 0);
}
-
+
/* free temp data - free manually as was copied without constraints */
- if (dummyPose) {
- for (pchan = dummyPose->chanbase.first; pchan; pchan = pchan->next) {
- if (pchan->prop) {
- IDP_FreeProperty(pchan->prop);
- MEM_freeN(pchan->prop);
- }
+ for (pchan = dummyPose->chanbase.first; pchan; pchan = pchan->next) {
+ if (pchan->prop) {
+ IDP_FreeProperty(pchan->prop);
+ MEM_freeN(pchan->prop);
}
-
- /* was copied without constraints */
- BLI_freelistN(&dummyPose->chanbase);
- MEM_freeN(dummyPose);
}
+
+ /* was copied without constraints */
+ BLI_freelistN(&dummyPose->chanbase);
+ MEM_freeN(dummyPose);
}
else {
/* no animation, so just reset whole pose to rest pose