Merge pull request #59345 from BastiaanOlij/call_correct_texture_free

Call the correct texture free method on texture storage cleanup
This commit is contained in:
Rémi Verschelde 2022-03-20 12:03:19 +01:00 committed by GitHub
commit 5901d91458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

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