summaryrefslogtreecommitdiff
path: root/drivers/gles2
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-02-12 07:04:12 -0300
committerGitHub <noreply@github.com>2019-02-12 07:04:12 -0300
commit7713ec86373b1b0305db28177f2128f4f8a363bc (patch)
tree94194b0cf6727fc04765ac1c3171dcb68195b245 /drivers/gles2
parente133bd94f03c7af35af6b6d1fcfc348c46febaf7 (diff)
parentdc7d9f8868f8e58ef6bfc5c3b4f417d3437331f0 (diff)
Merge pull request #25134 from staddy/master
Check for null pointer in RasterizerSceneGLES2::render_shadow
Diffstat (limited to 'drivers/gles2')
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp
index 2c52895bda..5ef21998dd 100644
--- a/drivers/gles2/rasterizer_scene_gles2.cpp
+++ b/drivers/gles2/rasterizer_scene_gles2.cpp
@@ -3041,7 +3041,9 @@ void RasterizerSceneGLES2::render_shadow(RID p_light, RID p_shadow_atlas, int p_
}
}
- glViewport(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height);
+ if (storage->frame.current_rt) {
+ glViewport(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height);
+ }
glColorMask(1, 1, 1, 1);
}