twn_textures.c: fix error in deinit
This commit is contained in:
parent
47799deb8b
commit
2b26fad983
@ -361,7 +361,7 @@ void textures_cache_deinit(TextureCache *cache) {
|
||||
|
||||
/* free cache hashes */
|
||||
for (size_t i = 0; i < shlenu(cache->hash); ++i) {
|
||||
if (missing_texture_surface && cache->hash[i].value.data->pixels != missing_texture_surface->pixels)
|
||||
if (missing_texture_surface == NULL || cache->hash[i].value.data->pixels != missing_texture_surface->pixels)
|
||||
stbi_image_free(cache->hash[i].value.data->pixels);
|
||||
else
|
||||
SDL_free(cache->hash[i].value.data->pixels);
|
||||
|
Loading…
Reference in New Issue
Block a user