From ba1e2367bbc57991a648b0feecfbdd94c337cd86 Mon Sep 17 00:00:00 2001 From: scawful Date: Thu, 30 May 2024 12:14:01 -0400 Subject: [PATCH] fix double free bug --- src/app/gfx/bitmap.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/app/gfx/bitmap.h b/src/app/gfx/bitmap.h index a632a6db..b9b157ac 100644 --- a/src/app/gfx/bitmap.h +++ b/src/app/gfx/bitmap.h @@ -68,7 +68,6 @@ class Bitmap { */ void Create(int width, int height, int depth, const Bytes &data); - /** * @brief Creates the underlying SDL_Texture to be displayed. * @@ -245,7 +244,6 @@ class Bitmap { void operator()(SDL_Texture *p) const { if (p != nullptr) { SDL_DestroyTexture(p); - p = nullptr; } } }; @@ -254,7 +252,6 @@ class Bitmap { void operator()(SDL_Surface *p) const { if (p != nullptr) { SDL_FreeSurface(p); - p = nullptr; } } };