mirror of https://github.com/encounter/SDL.git
Unneed test before calling SDL_FreeSurface
This commit is contained in:
parent
9209942949
commit
3e70553c48
|
@ -574,9 +574,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
|
||||||
if (src) {
|
if (src) {
|
||||||
SDL_RWseek(src, fp_offset, RW_SEEK_SET);
|
SDL_RWseek(src, fp_offset, RW_SEEK_SET);
|
||||||
}
|
}
|
||||||
if (surface) {
|
|
||||||
SDL_FreeSurface(surface);
|
SDL_FreeSurface(surface);
|
||||||
}
|
|
||||||
surface = NULL;
|
surface = NULL;
|
||||||
}
|
}
|
||||||
if (freesrc && src) {
|
if (freesrc && src) {
|
||||||
|
|
|
@ -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());
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (temp) {
|
|
||||||
SDL_FreeSurface(temp);
|
SDL_FreeSurface(temp);
|
||||||
}
|
|
||||||
if (path) {
|
if (path) {
|
||||||
SDL_free(path);
|
SDL_free(path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue