From 4999ba435af4c5abff4889a069d2da067c4e2f0f Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 2 Apr 2021 15:47:42 +0200 Subject: [PATCH] Fix setting _texture to null in free(). --- 05_sdl_alapok/texture.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/05_sdl_alapok/texture.cpp b/05_sdl_alapok/texture.cpp index 26fcb17..08ad096 100644 --- a/05_sdl_alapok/texture.cpp +++ b/05_sdl_alapok/texture.cpp @@ -129,6 +129,8 @@ void Texture::refresh() { void Texture::free() { if (_texture) { SDL_DestroyTexture(_texture); + + _texture = nullptr; } }