diff options
author | Bastien Montagne <bastien@blender.org> | 2020-04-29 19:11:33 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-04-29 19:11:33 +0300 |
commit | a54c1f1e77147352dfab1233ef63307e87e9f09c (patch) | |
tree | 1ce771f6842d9fce055c500f428593b7e27b45d8 | |
parent | 0ddf5860f56e66f62bc3a27d98fedc0edaba371a (diff) |
Fix T76155: 'Object lost data' on copy-pasting with new undo code.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 8837dccb837..98e6369b634 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9659,7 +9659,9 @@ static bool read_libblock_undo_restore( /* Do not add LIB_TAG_NEW here, this should not be needed/used in undo case anyway (as * this is only for do_version-like code), but for sake of consistency, and also because * it will tell us which ID is re-used from old Main, and which one is actually new. */ - const int id_tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_UNDO_OLD_ID_REUSED; + /* Also do not add LIB_TAG_NEED_LINK, those IDs will never be re-liblinked, hence that tag will + * never be cleared, leading to critical issue in link/appemd code. */ + const int id_tag = tag | LIB_TAG_UNDO_OLD_ID_REUSED; read_libblock_undo_restore_identical(fd, main, id, id_old, id_tag); /* Insert into library map for lookup by newly read datablocks (with pointer value bhead->old). |