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-05-30 13:27:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-30 13:27:16 +0400
commit8ae1f3881263a92e58872b78418230297c70a76a (patch)
tree54f8c6ea302c49ff55597a5d88407ea9345cdf5f /source/blender/blenloader
parent27c6ab98579c42fae164c4c74b17e5ce8fe65884 (diff)
workaround for crash when rig library links dont load. - will leak memory but better then crash.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 081264d62df..71e440cd1b8 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4051,7 +4051,16 @@ static void lib_link_object(FileData *fd, Main *main)
warn = 1;
if (ob->pose) {
+ /* we can't call #BKE_pose_free() here because of library linking
+ * freeing will recurse down into every pose constraints ID pointers
+ * which are not always valid, so for now free directly and suffer
+ * some leaked memory rather then crashing immediately
+ * while bad this _is_ an exceptional case - campbell */
+#if 0
BKE_pose_free(ob->pose);
+#else
+ MEM_freeN(ob->pose);
+#endif
ob->pose= NULL;
ob->mode &= ~OB_MODE_POSE;
}