[Bf-blender-cvs] [750111678a2] undo-experiments: Fix assert position.
Bastien Montagne
noreply at git.blender.org
Fri Feb 21 17:02:22 CET 2020
Commit: 750111678a27d72ef275d8eff3cad731f4ab7bd0
Author: Bastien Montagne
Date: Fri Feb 21 17:02:04 2020 +0100
Branches: undo-experiments
https://developer.blender.org/rB750111678a27d72ef275d8eff3cad731f4ab7bd0
Fix assert position.
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c2e3caee1c4..fbb02992a01 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9139,6 +9139,12 @@ static BHead *read_libblock(FileData *fd,
BLI_addtail(new_lb, id_old);
can_finalize_and_return = true;
+
+ const bool is_id_memaddress_already_registered = !BKE_main_idmemhash_register_id(
+ main, NULL, id_old);
+ /* Should never fail, since we re-used an existing ID it should have already been
+ * registered. */
+ BLI_assert(is_id_memaddress_already_registered);
}
if (can_finalize_and_return) {
@@ -9151,12 +9157,6 @@ static BHead *read_libblock(FileData *fd,
*r_id = id_old;
}
- const bool is_id_memaddress_already_registered = !BKE_main_idmemhash_register_id(
- main, NULL, id_old);
- /* Should never fail, since we re-used an existing ID it should have already been
- * registered. */
- BLI_assert(is_id_memaddress_already_registered);
-
MEM_freeN(id);
oldnewmap_free_unused(fd->datamap);
oldnewmap_clear(fd->datamap);
More information about the Bf-blender-cvs
mailing list