LibOverride: Fix resync sometimes deleting root ID of other liboverrides.
While this should not happen in theory, very bad/broken/dirty files can lead to such situations. So we need to re-ensure valid root IDs after resync (for now, done after each 'library indirect level' pass of resync, this may not be 100% bulletproof though, time will say). Found while investigating Blender studio issues in Snow parkour short.
This commit is contained in:
parent
d9fe565c85
commit
aab1561690
|
@ -2160,6 +2160,10 @@ static void lib_override_library_main_resync_on_library_indirect_level(
|
|||
|
||||
BLI_ghash_free(id_roots, NULL, MEM_freeN);
|
||||
|
||||
/* In some fairly rare (and degenerate) cases, some root ID from other liboverrides may have been
|
||||
* freed, and therefore set to NULL. Attempt to fix this as best as possible. */
|
||||
BKE_lib_override_library_main_hierarchy_root_ensure(bmain);
|
||||
|
||||
if (do_reports_recursive_resync_timing) {
|
||||
reports->duration.lib_overrides_recursive_resync += PIL_check_seconds_timer() - init_time;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue