mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-10 12:35:17 +00:00
Don't do NULL-checks before SDL_free()
Replaces the pattern
if (ptr) {
SDL_free(ptr);
}
with
SDL_free(ptr);
This commit is contained in:
committed by
Sam Lantinga
parent
2f810e0a5f
commit
aaee09d6ed
@@ -123,8 +123,6 @@ SDL_Texture *LoadTexture(SDL_Renderer *renderer, const char *file, bool transpar
|
||||
}
|
||||
}
|
||||
SDL_DestroySurface(temp);
|
||||
if (path) {
|
||||
SDL_free(path);
|
||||
}
|
||||
SDL_free(path);
|
||||
return texture;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user