Merge pull request #49520 from pfertyk/issue-46278-empty-texture-crashes-godot
Validate texture in RendererStorageRD::free
This commit is contained in:
commit
2787ee634a
1 changed files with 1 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue