diff options
author | Paweł Fertyk <pfertyk@pfertyk.me> | 2021-06-11 20:12:23 +0200 |
---|---|---|
committer | Paweł Fertyk <pfertyk@pfertyk.me> | 2021-06-11 20:12:23 +0200 |
commit | 31cd42373b0dae78aadfa1ab8896f8b064205aee (patch) | |
tree | 5a8b6f1632b737ea0185aec8ad9be1128293504f /servers/rendering | |
parent | 6b0183ec893ddea3f8ae71005b5fce1ae988e8a0 (diff) |
Validate texture in RendererStorageRD::free
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_storage_rd.cpp | 1 |
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)) { |