Fix T89963: crash when library override is applied to an object from a linked scene.

LibOverride of scenes is not really supported currently, there are many
issues with it.

Will disable most user-accessible ways to create such overrides in a
following commit.
This commit is contained in:
Bastien Montagne 2021-08-05 14:59:31 +02:00
parent be6409a748
commit 720ea8a67d
Notes: blender-bot 2023-02-14 08:08:54 +01:00
Referenced by issue #89963, crash when library override is applied to an object
1 changed files with 11 additions and 0 deletions

View File

@ -1599,6 +1599,17 @@ static void lib_override_library_main_resync_on_library_indirect_level(
(!ID_IS_LINKED(id) && library_indirect_level != 0)) {
continue;
}
/* We cannot resync a scene that is currently active. */
if (id == &scene->id) {
id->tag &= ~LIB_TAG_LIB_OVERRIDE_NEED_RESYNC;
BKE_reportf(reports->reports,
RPT_WARNING,
"Scene '%s' was not resynced as it is the currently active one",
scene->id.name + 2);
continue;
}
Library *library = id->lib;
int level = 0;