Merge pull request #56148 from BastiaanOlij/fix_deleting_unowned_texture

This commit is contained in:
Rémi Verschelde 2021-12-22 17:04:34 +01:00 committed by GitHub
commit a75afd61a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -5264,6 +5264,7 @@ void RasterizerStorageGLES2::_render_target_clear(RenderTarget *rt) {
// clean up our texture
Texture *t = texture_owner.get(rt->external.texture);
t->tex_id = 0;
t->alloc_height = 0;
t->alloc_width = 0;
t->width = 0;
@ -5428,6 +5429,7 @@ void RasterizerStorageGLES2::render_target_set_external_texture(RID p_render_tar
// clean up our texture
Texture *t = texture_owner.get(rt->external.texture);
t->tex_id = 0;
t->alloc_height = 0;
t->alloc_width = 0;
t->width = 0;

View file

@ -6850,6 +6850,7 @@ void RasterizerStorageGLES3::_render_target_clear(RenderTarget *rt) {
// clean up our texture
Texture *t = texture_owner.get(rt->external.texture);
t->tex_id = 0;
t->alloc_height = 0;
t->alloc_width = 0;
t->width = 0;
@ -7359,6 +7360,7 @@ void RasterizerStorageGLES3::render_target_set_external_texture(RID p_render_tar
// clean up our texture
Texture *t = texture_owner.get(rt->external.texture);
t->tex_id = 0;
t->alloc_height = 0;
t->alloc_width = 0;
t->width = 0;