From 31cd42373b0dae78aadfa1ab8896f8b064205aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Fertyk?= Date: Fri, 11 Jun 2021 20:12:23 +0200 Subject: Validate texture in RendererStorageRD::free --- servers/rendering/renderer_rd/renderer_storage_rd.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'servers/rendering/renderer_rd') 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)) { -- cgit v1.2.3