[Bf-blender-cvs] [ca87117afeb] custom-manipulators: Add missing NULL check (face-map might not have a bone)
Campbell Barton
noreply at git.blender.org
Tue May 30 08:10:39 CEST 2017
Commit: ca87117afeb9fea910a79535bfc8a25834656d2b
Author: Campbell Barton
Date: Tue May 30 16:07:49 2017 +1000
Branches: custom-manipulators
https://developer.blender.org/rBca87117afeb9fea910a79535bfc8a25834656d2b
Add missing NULL check (face-map might not have a bone)
===================================================================
M source/blender/blenkernel/intern/armature.c
===================================================================
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index d1231725400..94c0e7c6537 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -2489,7 +2489,7 @@ void BKE_pose_fmap_cache_update(Depsgraph *graph, Object *ob_pose)
/* We know that 'ob' is a mesh that is deformed by 'ob_act'. */
for (bFaceMap *fmap = ob->fmaps.first; fmap; fmap = fmap->next) {
bPoseChannel *pchan = BKE_pose_channel_find_name(ob_pose->pose, fmap->name);
- if (pchan->bone->flag & BONE_DRAW_FMAP) {
+ if (pchan && pchan->bone->flag & BONE_DRAW_FMAP) {
if (pchan->fmap_data != NULL) {
/* XXX, we could support multiple meshes per bone,
* it's a corner-case so only add if users end up needing it. */
More information about the Bf-blender-cvs
mailing list