[Bf-blender-cvs] [1be717d] master: Fix (unreported) crash when drawing armatures' poses in some cases.
Bastien Montagne
noreply at git.blender.org
Tue Nov 22 12:24:13 CET 2016
Commit: 1be717d00783160200b354a03d660661628ea24a
Author: Bastien Montagne
Date: Tue Nov 22 12:21:25 2016 +0100
Branches: master
https://developer.blender.org/rB1be717d00783160200b354a03d660661628ea24a
Fix (unreported) crash when drawing armatures' poses in some cases.
Was affecting armatures' pose drawing code, could try to draw with
non-updated pose, which may contain NULL bone pointers (e.g. after some
data-block management tool execution, like make local, remapping, etc.).
===================================================================
M source/blender/editors/space_view3d/drawarmature.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 1d9a515..95a2df6 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -2723,6 +2723,11 @@ bool draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
else {
/* Draw Pose */
if (ob->pose && ob->pose->chanbase.first) {
+ /* We can't safely draw non-updated pose, might contain NULL bone pointers... */
+ if (ob->pose->flag & POSE_RECALC) {
+ BKE_pose_rebuild(ob, arm);
+ }
+
/* drawing posemode selection indices or colors only in these cases */
if (!(base->flag & OB_FROMDUPLI)) {
if (G.f & G_PICKSEL) {
More information about the Bf-blender-cvs
mailing list