Unneed test before calling SDL_FreeSurface

This commit is contained in:
Sylvain authored and Sam Lantinga committed 2022-11-18 06:58:34 -08:00
1 parent 9209942949
commit 3e70553c48
2 files changed
+2 -6

No files matched your search

+1 -3
View File
@@ -143,9 +143,7 @@ LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent,
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError());
}
}
if (temp) {
SDL_FreeSurface(temp);
}
SDL_FreeSurface(temp);
if (path) {
SDL_free(path);
}