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>2013-02-06 06:48:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-06 06:48:03 +0400
commit441c7fb79a83b7d6f9e86cd2a3b0c8eaeec6d07c (patch)
treec36037cb30d34107fde0d2441ac7c3e768a8c9bb /source/blender/editors/armature/editarmature.c
parent6ff014a7fe2621da897c7511fe100ea5ff2af2a9 (diff)
fix for crashes running some operators in background mode and some divide by zero errors.
Diffstat (limited to 'source/blender/editors/armature/editarmature.c')
-rw-r--r--source/blender/editors/armature/editarmature.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index fc38364577e..3bcb4002ece 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -563,7 +563,9 @@ void docenter_armature(Scene *scene, Object *ob, float cursor[3], int centermode
add_v3_v3(cent, ebone->head);
add_v3_v3(cent, ebone->tail);
}
- mul_v3_fl(cent, 1.0f / (float)total);
+ if (total) {
+ mul_v3_fl(cent, 1.0f / (float)total);
+ }
}
else {
float min[3], max[3];