Fix: Move DRW_shgroup_add_material_resources(grp, mat) to after the null-check for grp.

Reviewed By: fclem

Maniphest Tasks: T99646

Differential Revision: https://developer.blender.org/D15436
This commit is contained in:
Martijn Versteegh 2022-07-15 11:22:10 +02:00 committed by Clément Foucault
parent f4d7ea2cf6
commit 8e1323f633
Notes: blender-bot 2023-02-14 08:28:46 +01:00
Referenced by issue #99646, Regression: Crash when rendering Quick effect Liquid
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 2 additions and 1 deletions

View File

@ -316,12 +316,13 @@ void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata,
DRWShadingGroup *grp = DRW_shgroup_create(sh, vedata->psl->volumetric_objects_ps);
grp = DRW_shgroup_volume_create_sub(scene, ob, grp, mat);
DRW_shgroup_add_material_resources(grp, mat);
if (grp == NULL) {
return;
}
DRW_shgroup_add_material_resources(grp, mat);
/* TODO(fclem): remove those "unnecessary" UBOs */
DRW_shgroup_uniform_block(grp, "planar_block", sldata->planar_ubo);
DRW_shgroup_uniform_block(grp, "probe_block", sldata->probe_ubo);