From fa959715fd8a06664f4a4f0aa60a1da05aee3e3f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 11 Nov 2015 12:28:06 +0100 Subject: Free libraries last, and not first - most datablocks may have link to those... --- source/blender/blenkernel/intern/library.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern') diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index e8f02ee8204..f7f4f1c1ab7 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); -- cgit v1.2.3