diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-20 12:03:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-20 12:03:19 +0100 |
commit | 5901d9145822bd068078441f4e96377d49018ed9 (patch) | |
tree | 8779dd8c718350c48da4f04403c635286204d6ac | |
parent | b05e56e90d5d2fe15290dc7f277e7c9f53fc96f0 (diff) | |
parent | 0b5a9e4f6ef0fede73b84f5c684e0416af4ef742 (diff) |
Merge pull request #59345 from BastiaanOlij/call_correct_texture_free
Call the correct texture free method on texture storage cleanup
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/texture_storage.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp index acdaaae7a4..4e33e60b3a 100644 --- a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp @@ -300,12 +300,14 @@ TextureStorage::TextureStorage() { } TextureStorage::~TextureStorage() { - singleton = nullptr; - //def textures for (int i = 0; i < DEFAULT_RD_TEXTURE_MAX; i++) { - texture_free(default_rd_textures[i]); + if (default_rd_textures[i].is_valid()) { + RD::get_singleton()->free(default_rd_textures[i]); + } } + + singleton = nullptr; } bool TextureStorage::can_create_resources_async() const { |