summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-12 22:27:14 +0200
committerGitHub <noreply@github.com>2021-06-12 22:27:14 +0200
commit2787ee634adf70092a960f4aa5104bba63db1c48 (patch)
tree95dee3c69ec85baee2e453869c6dac2a5c7f168b /servers/rendering
parent02b3adc150637c38b6814e7d4b4554de127773cc (diff)
parent31cd42373b0dae78aadfa1ab8896f8b064205aee (diff)
Merge pull request #49520 from pfertyk/issue-46278-empty-texture-crashes-godot
Validate texture in RendererStorageRD::free
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
index 05993829d1..4f96defc0f 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
@@ -8552,6 +8552,7 @@ bool RendererStorageRD::free(RID p_rid) {
if (texture_owner.owns(p_rid)) {
Texture *t = texture_owner.getornull(p_rid);
+ ERR_FAIL_COND_V(!t, false);
ERR_FAIL_COND_V(t->is_render_target, false);
if (RD::get_singleton()->texture_is_valid(t->rd_texture_srgb)) {