diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-02-22 00:51:35 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-02-22 00:51:35 +0300 |
commit | 87c72a7d2714de286109573055d5d5da32ece91e (patch) | |
tree | 73a278791f7dcde5b97e374c846d25d1ac9682c2 /source/blender/blenkernel/intern/library.c | |
parent | 7be1928ea1986408972007081ec139ee802ed528 (diff) |
BKE: Changing ID freeing order.
Screen can contains manipulators that contains batches to be freed before the opengl contexts (in WM) are destroyed.
Also fix other GPU related free.
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index e0608efece2..6169263b7cf 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1067,6 +1067,8 @@ int set_listbasepointers(Main *main, ListBase **lb) * This is important because freeing data decreases usercounts of other datablocks, * if this data is its self freed it can crash. */ lb[INDEX_ID_LI] = &(main->library); /* Libraries may be accessed from pretty much any other ID... */ + lb[INDEX_ID_WS] = &(main->workspaces); /* before wm, so it's freed after it! */ + lb[INDEX_ID_WM] = &(main->wm); lb[INDEX_ID_IP] = &(main->ipo); lb[INDEX_ID_AC] = &(main->action); /* moved here to avoid problems when freeing with animato (aligorith) */ lb[INDEX_ID_KE] = &(main->key); @@ -1108,8 +1110,6 @@ int set_listbasepointers(Main *main, ListBase **lb) lb[INDEX_ID_OB] = &(main->object); lb[INDEX_ID_LS] = &(main->linestyle); /* referenced by scenes */ lb[INDEX_ID_SCE] = &(main->scene); - lb[INDEX_ID_WS] = &(main->workspaces); /* before wm, so it's freed after it! */ - lb[INDEX_ID_WM] = &(main->wm); lb[INDEX_ID_MSK] = &(main->mask); lb[INDEX_ID_NULL] = NULL; |