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:
commit
5901d91458
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue