fix for segfault loading a file with a proxy that is a missing link.

This commit is contained in:
Campbell Barton
2012-06-20 21:10:34 +00:00
parent 82bad4bd6c
commit 463a4ebf1c

View File

@@ -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 */