svn merge ^/trunk/blender -r47210:47214
authorCampbell Barton <ideasman42@gmail.com>
Wed, 30 May 2012 09:28:37 +0000 (09:28 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 30 May 2012 09:28:37 +0000 (09:28 +0000)
source/blender/blenloader/intern/readfile.c
source/blender/compositor/intern/COM_MemoryManagerState.cpp

index 21a2d776232820b349c80da38f948ed548ca0915..9122e01fb2ad0da99b34c7b6ff24166ddd74e3e0 100644 (file)
@@ -4052,7 +4052,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;
                                }
index b40ae146f9ef36597122b489494a89d0a01b81b8..6098bf15569a463357f271bcb7ceeda12cf67100 100644 (file)
@@ -45,7 +45,7 @@ MemoryManagerState::~MemoryManagerState()
                        delete buffer;
                }
        }
-       delete this->chunkBuffers;
+       delete [] this->chunkBuffers;
        BLI_mutex_end(&this->mutex);
 }