From e54c4028ef7e4e809f7f4b591ad12a2468f4d71b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 22 Aug 2017 11:21:48 -0300 Subject: Invalid materials or shaders will now interrupt the next chain in materials, closes #9570 --- drivers/gles3/rasterizer_scene_gles3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gles3/rasterizer_scene_gles3.cpp') diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index c89fc0768f..05cfba726c 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -2186,7 +2186,7 @@ void RasterizerSceneGLES3::_add_geometry(RasterizerStorageGLES3::Geometry *p_geo while (m->next_pass.is_valid()) { m = storage->material_owner.getornull(m->next_pass); - if (!m) + if (!m || !m->shader || !m->shader->valid) break; _add_geometry_with_material(p_geometry, p_instance, p_owner, m, p_shadow); } -- cgit v1.2.3