[Bf-blender-cvs] [64890a62cdc] blender2.8: Eevee: Add failsafe check in shadow material.

Clément Foucault noreply at git.blender.org
Tue Jul 11 12:46:19 CEST 2017


Commit: 64890a62cdce0f5fb11a48b1d51710c13bb5c702
Author: Clément Foucault
Date:   Tue Jul 11 12:42:59 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB64890a62cdce0f5fb11a48b1d51710c13bb5c702

Eevee: Add failsafe check in shadow material.

===================================================================

M	source/blender/draw/engines/eevee/eevee_lights.c

===================================================================

diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c
index 37b33e21021..096a02668b1 100644
--- a/source/blender/draw/engines/eevee/eevee_lights.c
+++ b/source/blender/draw/engines/eevee/eevee_lights.c
@@ -200,6 +200,9 @@ void EEVEE_lights_cache_shcaster_material_add(
 	EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl, struct GPUMaterial *gpumat, struct Gwn_Batch *geom, float (*obmat)[4], float *alpha_threshold)
 {
 	DRWShadingGroup *grp = DRW_shgroup_material_instance_create(gpumat, psl->shadow_cube_pass, geom);
+
+	if (grp == NULL) return;
+
 	DRW_shgroup_uniform_block(grp, "shadow_render_block", sldata->shadow_render_ubo);
 	DRW_shgroup_uniform_mat4(grp, "ShadowModelMatrix", (float *)obmat);




More information about the Bf-blender-cvs mailing list