mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-14 02:07:49 +00:00
Christoph Mallon: Remove pointless if (x) before SDL_FreeSurface(x)
This commit is contained in:
parent
f79fc33a39
commit
3e2930defe
9 changed files with 51 additions and 123 deletions
|
|
@ -1012,10 +1012,8 @@ SDL_SW_SetupYUVDisplay(SDL_SW_YUVTexture * swdata, Uint32 target_format)
|
|||
break;
|
||||
}
|
||||
|
||||
if (swdata->display) {
|
||||
SDL_FreeSurface(swdata->display);
|
||||
swdata->display = NULL;
|
||||
}
|
||||
SDL_FreeSurface(swdata->display);
|
||||
swdata->display = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1338,12 +1336,8 @@ SDL_SW_DestroyYUVTexture(SDL_SW_YUVTexture * swdata)
|
|||
SDL_free(swdata->pixels);
|
||||
SDL_free(swdata->colortab);
|
||||
SDL_free(swdata->rgb_2_pix);
|
||||
if (swdata->stretch) {
|
||||
SDL_FreeSurface(swdata->stretch);
|
||||
}
|
||||
if (swdata->display) {
|
||||
SDL_FreeSurface(swdata->display);
|
||||
}
|
||||
SDL_FreeSurface(swdata->stretch);
|
||||
SDL_FreeSurface(swdata->display);
|
||||
SDL_free(swdata);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue