Fix #118055: libOverride resync() RNA call crashes when view_layer is not specified.

Underlying `lib_override_library_resync` code lost the optional aspect
of its `view_layer` parameter at some point, trivial to restore it
luckily.

3.3-specific version of original fix (711e4cdd94).

Pull Request: https://projects.blender.org/blender/blender/pulls/118364
This commit is contained in:
Bastien Montagne 2024-02-16 10:36:32 +01:00 • committed by Philipp Oeser
parent 5b79fc9885
commit 6d39e78438

View file

@ -1724,7 +1724,7 @@ static bool lib_override_library_resync(Main *bmain,
ID *id_root_reference = id_root->override_library->reference;
ID *id;
const Object *old_active_object = OBACT(view_layer);
const Object *old_active_object = view_layer ? OBACT(view_layer) : nullptr;
if (id_root_reference->tag & LIB_TAG_MISSING) {
BKE_reportf(reports != nullptr ? reports->reports : nullptr,