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-11 06:18:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-11 06:18:27 +0400
commita0ae47f06c6232a91202bd06ea173b955735596b (patch)
treed0c928e2167037eec5f01277ebe7dc0885168d59 /source/blender/editors/transform
parent652f64762c31bd1cfcac7ae05f184b70713b2034 (diff)
add some missing NULL checks, a few parts of the code used a pointer then checked it for NULL after.
also made it more clear that some areas assume the pointer isnt null (remove redundant NULL checks).
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_conversions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index e635c4b3fb8..c1859407789 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -861,7 +861,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
data->rootbone = 0; /* watch-it! has to be 0 here, since we're still on the same bone for the first time through the loop [#25885] */
/* we only include bones that are part of a continual connected chain */
- while (pchan) {
+ do {
/* here, we set ik-settings for bone from pchan->protectflag */
// XXX: careful with quats/axis-angle rotations where we're locking 4d components
if (pchan->protectflag & OB_LOCK_ROTX) pchan->ikflag |= BONE_IK_NO_XDOF_TEMP;
@@ -876,7 +876,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
pchan = pchan->parent;
else
pchan = NULL;
- }
+ } while (pchan);
/* make a copy of maximum chain-length */
data->max_rootbone = data->rootbone;