From 2b02bf9d2eada568914d1c3f240c5367d7aca50b Mon Sep 17 00:00:00 2001 From: herbglitch Date: Fri, 23 Jun 2023 01:52:07 -0600 Subject: [PATCH] possible fix for spritesheet breaking unload --- src/graphics/sdl/config.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graphics/sdl/config.c b/src/graphics/sdl/config.c index e03b21b..71ab8d9 100644 --- a/src/graphics/sdl/config.c +++ b/src/graphics/sdl/config.c @@ -491,13 +491,17 @@ void ARC_Spritesheet_Delete(ARC_Config* config, ARC_String *string, void *value) void *temp; ARC_Config_Get(config, string, &temp); if(temp){ + //TODO: test to see if this breaks references free(sheetValue); return; } uint64_t split = getIndexAndErrorCheck(string, ",", 1); if(arc_errno){ - free(sheetValue); + //TODO: test to make sure no edge cases + // free(sheetValue); + ARC_SDL_Texture_Delete(config, string, value); + arc_errno = 0; return; }