Commit: 1fbb124154b44aa91d35416409654d45a6668edd
Author: Julian Eisel
Date:   Fri Nov 13 23:01:04 2015 +0100
Branches: wiggly-widgets
https://developer.blender.org/rB1fbb124154b44aa91d35416409654d45a6668edd

Fix crash reading .blend with bones that don't have Face Map object assigned

===================================================================

M       source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 1677bb1..50483c8 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3218,8 +3218,10 @@ static void lib_link_pose(FileData *fd, Main *bmain, 
Object *ob, bPose *pose)
                pchan->bone = BKE_armature_find_bone_name(arm, pchan->name);
 
                pchan->fmap_object = newlibadr_us(fd, arm->id.lib, 
pchan->fmap_object);
-               /* fix fmap pointer now that we've got updated fmap_object */
-               pchan->fmap = fmap_find_name(pchan->fmap_object, 
pchan->fmap->name);
+               if (pchan->fmap_object) {
+                       /* fix fmap pointer now that we've got updated 
fmap_object */
+                       pchan->fmap = fmap_find_name(pchan->fmap_object, 
pchan->fmap->name);
+               }
 
                pchan->custom = newlibadr_us(fd, arm->id.lib, pchan->custom);
                if (pchan->bone == NULL)

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to