Fix T103031: ViewLayer: Crash in indirect_only_get due to missing null check

Previous fix (rBe00f76c6a8cca) accidentally lost a null check.
Fixes T103031.
This commit is contained in:
Aras Pranckevicius
2022-12-09 20:20:11 +02:00
parent c85ca5e365
commit 874319a344

View File

@@ -205,6 +205,10 @@ static bool rna_Object_holdout_get(Object *ob, bContext *C, PointerRNA *view_lay
static bool rna_Object_indirect_only_get(Object *ob, bContext *C, PointerRNA *view_layer_ptr)
{
Base *base = find_view_layer_base_with_synced_ensure(ob, C, view_layer_ptr, NULL, NULL);
if (!base) {
return false;
}
return ((base->flag & BASE_INDIRECT_ONLY) != 0);
}