Validate texture in RendererStorageRD::free

This commit is contained in:
Paweł Fertyk 2021-06-11 20:12:23 +02:00
parent 6b0183ec89
commit 31cd42373b

View File

@ -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)) {