diff options
author | Bastien Montagne <bastien@blender.org> | 2021-03-25 13:21:15 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-03-25 13:21:15 +0300 |
commit | 150e0553daff3c9bd6f1921fb1f91a41e4017d78 (patch) | |
tree | ef3d3c5c48fa363d403591a98b2d3b329ba0f773 /source/blender/makesrna/intern/rna_access_compare_override.c | |
parent | 3b0531154e0d8cce16038fbe8b92e7cd05e3dc9f (diff) |
Fix T86853: Critical bug in write code of CacheFile ID.
CacheFile writing code would not write generic ID data (call for it has
been missing since the initial commit, rB61050f75b13e).
While potentially affecting other areas (mostly CustomProperties/IDProperties),
this was a critical failure for liboverrides. Also added some workaround
code to allow opening broken files (though the override of the CacheFile
data-block will be lost).
Diffstat (limited to 'source/blender/makesrna/intern/rna_access_compare_override.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access_compare_override.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c index 80833d4f992..39e7774e5a4 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.c +++ b/source/blender/makesrna/intern/rna_access_compare_override.c @@ -1098,6 +1098,10 @@ static void rna_property_override_check_resync(Main *bmain, ID *id_dst = rna_property_override_property_real_id_owner(bmain, ptr_item_dst, NULL, NULL); BLI_assert(id_src == NULL || ID_IS_OVERRIDE_LIBRARY_REAL(id_src)); + /* Work around file corruption on writing, see T86853. */ + if (id_src != NULL && !ID_IS_OVERRIDE_LIBRARY_REAL(id_src)) { + return; + } if (/* We might be in a case where id_dst has already been processed and its usages * remapped to its new local override. In that case overrides and linked data |