From ffdac72eaa8691d26965b158cbe314b4dd828f06 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 30 Sep 2022 09:55:32 +0800 Subject: Add various null checks in RenderingServer --- drivers/gles3/storage/texture_storage.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gles3/storage') diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp index a801b3285a..e18c0ec649 100644 --- a/drivers/gles3/storage/texture_storage.cpp +++ b/drivers/gles3/storage/texture_storage.cpp @@ -666,6 +666,8 @@ void TextureStorage::texture_free(RID p_texture) { } void TextureStorage::texture_2d_initialize(RID p_texture, const Ref &p_image) { + ERR_FAIL_COND(p_image.is_null()); + Texture texture; texture.width = p_image->get_width(); texture.height = p_image->get_height(); -- cgit v1.2.3