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
Notes: blender-bot 2023-02-13 13:52:55 +01:00
Referenced by issue #103031, Regression: My blend file crashes when rendering in Blender 3.4 upwards, because of an unchecked NULL in the code. (stack trace provided)
Referenced by issue #102967, 3.4: Potential candidates for corrective releases
1 changed files with 4 additions and 0 deletions

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);
}