Christoph Mallon: Remove pointless if (x) before SDL_free(x)
This commit is contained in:
parent
edc88be724
commit
08dfaaa2e6
63 changed files with 157 additions and 349 deletions
|
@ -233,9 +233,7 @@ static SDL_bool AddDialogButton(WIN_DialogData *dialog, int x, int y, int w, int
|
|||
|
||||
static void FreeDialogData(WIN_DialogData *dialog)
|
||||
{
|
||||
if (dialog->data) {
|
||||
SDL_free(dialog->data);
|
||||
}
|
||||
SDL_free(dialog->data);
|
||||
SDL_free(dialog);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,9 +75,7 @@ WIN_CreateDevice(int devindex)
|
|||
data = NULL;
|
||||
}
|
||||
if (!data) {
|
||||
if (device) {
|
||||
SDL_free(device);
|
||||
}
|
||||
SDL_free(device);
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -319,9 +319,7 @@ WIN_SetWindowTitle(_THIS, SDL_Window * window)
|
|||
title = NULL;
|
||||
}
|
||||
SetWindowText(hwnd, title ? title : TEXT(""));
|
||||
if (title) {
|
||||
SDL_free(title);
|
||||
}
|
||||
SDL_free(title);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue