Fix setting _texture to null in free().

This commit is contained in:
Relintai 2021-04-02 15:47:42 +02:00
parent b5ddef635e
commit 4999ba435a

View File

@ -129,6 +129,8 @@ void Texture::refresh() {
void Texture::free() { void Texture::free() {
if (_texture) { if (_texture) {
SDL_DestroyTexture(_texture); SDL_DestroyTexture(_texture);
_texture = nullptr;
} }
} }