[Bf-blender-cvs] [fa95971] master: Free libraries last, and not first - most datablocks may have link to those...
Bastien Montagne
noreply at git.blender.org
Wed Nov 11 12:43:38 CET 2015
Commit: fa959715fd8a06664f4a4f0aa60a1da05aee3e3f
Author: Bastien Montagne
Date: Wed Nov 11 12:28:06 2015 +0100
Branches: master
https://developer.blender.org/rBfa959715fd8a06664f4a4f0aa60a1da05aee3e3f
Free libraries last, and not first - most datablocks may have link to those...
===================================================================
M source/blender/blenkernel/intern/library.c
===================================================================
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index e8f02ee..f7f4f1c 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -600,8 +600,9 @@ int set_listbasepointers(Main *main, ListBase **lb)
/* BACKWARDS! also watch order of free-ing! (mesh<->mat), first items freed last.
* This is important because freeing data decreases usercounts of other datablocks,
* if this data is its self freed it can crash. */
+ lb[a++] = &(main->library); /* Libraries may be accessed from pretty much any other ID... */
lb[a++] = &(main->ipo);
- lb[a++] = &(main->action); // xxx moved here to avoid problems when freeing with animato (aligorith)
+ lb[a++] = &(main->action); /* moved here to avoid problems when freeing with animato (aligorith) */
lb[a++] = &(main->key);
lb[a++] = &(main->gpencil); /* referenced by nodes, objects, view, scene etc, before to free after. */
lb[a++] = &(main->nodetree);
@@ -639,7 +640,6 @@ int set_listbasepointers(Main *main, ListBase **lb)
lb[a++] = &(main->object);
lb[a++] = &(main->linestyle); /* referenced by scenes */
lb[a++] = &(main->scene);
- lb[a++] = &(main->library);
lb[a++] = &(main->wm);
lb[a++] = &(main->mask);
More information about the Bf-blender-cvs
mailing list