summaryrefslogtreecommitdiff
path: root/drivers/gles3/storage
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-30 09:58:58 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-30 09:58:58 +0200
commitfe40c52be89e2e5de53d39fe8ec894b9c2ca2c1e (patch)
treea7c1cf6b46baad89cc1f3867a904b281b9fbec0f /drivers/gles3/storage
parenta0d17380fd562468c5caed8695f7752cd99ca38a (diff)
parentffdac72eaa8691d26965b158cbe314b4dd828f06 (diff)
Merge pull request #66638 from timothyqiu/rendering-null
Add various null checks in RenderingServer
Diffstat (limited to 'drivers/gles3/storage')
-rw-r--r--drivers/gles3/storage/texture_storage.cpp2
1 files changed, 2 insertions, 0 deletions
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<Image> &p_image) {
+ ERR_FAIL_COND(p_image.is_null());
+
Texture texture;
texture.width = p_image->get_width();
texture.height = p_image->get_height();