Skip to content

Commit

Permalink
Merge pull request #56148 from BastiaanOlij/fix_deleting_unowned_texture
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Dec 22, 2021
2 parents f2ddafd + 5fbc24f commit a75afd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gles2/rasterizer_storage_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gles3/rasterizer_storage_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a75afd6

Please sign in to comment.