diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-02 01:02:25 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-02 01:04:04 +0300 |
commit | ccecc409e4eae160609bfd7e6803cda2afd0c0eb (patch) | |
tree | 266808e6cf11d239a23221383d1c983148d4ae85 /source/blender | |
parent | e0458a3ead24b3df3b29b37dbff9cd2b2bf0e359 (diff) |
Fix T62098: Outliner: Delete hierarchy crash.
Stupid mistake in own logic would prevent first deleted ID to be
properly unlinked from rest of .blend file before its deletion...
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/library_remap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index e965e2a6aac..c4cd14e027e 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -956,6 +956,7 @@ static void id_delete(Main *bmain, const bool do_tagged_deletion) { const int tag = LIB_TAG_DOIT; ListBase *lbarray[MAX_LIBARRAY]; + Link dummy_link = {0}; int base_count, i; /* Used by batch tagged deletion, when we call BKE_id_free then, id is no more in Main database, @@ -1000,11 +1001,8 @@ static void id_delete(Main *bmain, const bool do_tagged_deletion) } } if (last_remapped_id == NULL) { - last_remapped_id = tagged_deleted_ids.first; - if (last_remapped_id == NULL) { - BLI_assert(!keep_looping); - break; - } + dummy_link.next = tagged_deleted_ids.first; + last_remapped_id = (ID *)(&dummy_link); } for (id = last_remapped_id->next; id; id = id->next) { /* Will tag 'never NULL' users of this ID too. |