[Bf-blender-cvs] [5fd151b84d6] undo-experiments: Undo experiments: remove assert that can only be true in some specific cases.

Bastien Montagne noreply at git.blender.org
Fri Nov 15 09:23:21 CET 2019


Commit: 5fd151b84d69419df01313f56876a027f12cfd53
Author: Bastien Montagne
Date:   Fri Nov 15 09:22:38 2019 +0100
Branches: undo-experiments
https://developer.blender.org/rB5fd151b84d69419df01313f56876a027f12cfd53

Undo experiments: remove assert that can only be true in some specific cases.

===================================================================

M	source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 884cc325e92..db94b1ee378 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9271,8 +9271,10 @@ static BHead *read_libblock(FileData *fd,
         BLI_assert(fd->memfile);
         Main *old_main = fd->old_mainlist->first;
         ID *old_id = NULL;
-        if ((old_id = BKE_libblock_find_name(old_main, idcode, id->name + 2))) {
-          BLI_assert(old_id == id_bhead->old);
+        if ((old_id = BKE_libblock_find_name(old_main, idcode, id->name + 2)) != NULL) {
+          /* that would only match for basic undo step, redo and other history navigation cannot
+           * guarantee this at all. */
+          // BLI_assert(old_id == id_bhead->old);
           MEM_freeN(id);
           id = old_id;



More information about the Bf-blender-cvs mailing list