From 7a07895920196c00d1ee14187e4ccdb2a6f0d0b9 Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Fri, 25 Aug 2017 11:14:33 -0400 Subject: Added/Fixed null pointer checks --- drivers/gles3/rasterizer_gles3.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index e025992c0b..274782c997 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -247,11 +247,8 @@ void RasterizerGLES3::set_current_render_target(RID p_render_target) { if (p_render_target.is_valid()) { RasterizerStorageGLES3::RenderTarget *rt = storage->render_target_owner.getornull(p_render_target); - if (!rt) { - storage->frame.current_rt = NULL; - } - ERR_FAIL_COND(!rt); storage->frame.current_rt = rt; + ERR_FAIL_COND(!rt); storage->frame.clear_request = false; glViewport(0, 0, rt->width, rt->height); -- cgit v1.2.3