1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-17 18:18:30 +02:00

Destroy towerbg and titlebg textures in destroy_buffers

For consistency, since they are created in create_buffers as well. I
checked with Valgrind (which is very noisy on Wayland, it turns out),
but I didn't see anything about them not being freed. It doesn't hurt to
use VVV_freefunc here anyway, though, since it does a NULL check and
nulls the pointer afterwards, which should prevent double-freeing and
use-after-frees.
This commit is contained in:
Misa 2023-03-03 15:34:13 -08:00
parent d1e9bdc284
commit 04743abe91

View File

@ -208,6 +208,8 @@ void Graphics::destroy_buffers(void)
VVV_freefunc(SDL_DestroyTexture, menuoffTexture);
VVV_freefunc(SDL_DestroyTexture, foregroundTexture);
VVV_freefunc(SDL_DestroyTexture, backgroundTexture);
VVV_freefunc(SDL_DestroyTexture, towerbg.texture);
VVV_freefunc(SDL_DestroyTexture, titlebg.texture);
}
void Graphics::drawspritesetcol(int x, int y, int t, int c)