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-06-21 01:10:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-21 01:10:34 +0400
commit463a4ebf1c158c3094f9f73bcf8ce69ac5f8fbd7 (patch)
tree48d4a84dddc464c44ad00b12effee33ca2da613d /source/blender/blenkernel/intern/armature.c
parent82bad4bd6cb9f285ad541ccc0b91f16784f73c6b (diff)
fix for segfault loading a file with a proxy that is a missing link.
Diffstat (limited to 'source/blender/blenkernel/intern/armature.c')
-rw-r--r--source/blender/blenkernel/intern/armature.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 9af1d5f52c4..96959398bc2 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1588,7 +1588,11 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
pchanp = BKE_pose_channel_find_name(frompose, pchan->name);
- if (pchan->bone->layer & layer_protected) {
+ if (UNLIKELY(pchanp == NULL)) {
+ /* happens for proxies that become invalid because of a missing link
+ * for regulat cases it shouldn't happen at all */
+ }
+ else if (pchan->bone->layer & layer_protected) {
ListBase proxylocal_constraints = {NULL, NULL};
/* copy posechannel to temp, but restore important pointers */