Remove un-needed check for NULL pointer. They were previously checked just before.

This commit is contained in:
Sylvain
2022-11-16 21:27:16 +01:00
parent 8ea96f365f
commit 1d7966df15
5 changed files with 8 additions and 13 deletions

View File

@@ -1302,9 +1302,8 @@ SDL_GetWindowDisplayMode(SDL_Window * window, SDL_DisplayMode * mode)
return SDL_SetError("Couldn't find display mode match");
}
if (mode) {
*mode = fullscreen_mode;
}
*mode = fullscreen_mode;
return 0;
}

View File

@@ -308,8 +308,8 @@ KMSDRM_CreateDevice(void)
return device;
cleanup:
if (device)
SDL_free(device);
SDL_free(device);
if (viddata)
SDL_free(viddata);
return NULL;