possible fix for spritesheet breaking unload

This commit is contained in:
herbglitch 2023-06-23 01:52:07 -06:00
parent 8a29955b1f
commit 2b02bf9d2e

View file

@ -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;
}