mirror of https://github.com/encounter/SDL.git
Remove un-needed check for NULL pointer. They were previously checked just before.
This commit is contained in:
parent
8ea96f365f
commit
1d7966df15
|
@ -549,11 +549,9 @@ SDL_IBus_Init(void)
|
|||
inotify_wd = inotify_add_watch(inotify_fd, addr_file, IN_CREATE | IN_MODIFY);
|
||||
SDL_free(addr_file);
|
||||
|
||||
if (addr) {
|
||||
result = IBus_SetupConnection(dbus, addr);
|
||||
SDL_free(addr);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -648,9 +648,7 @@ SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *state, int *second
|
|||
check_upower_device(dbus->system_conn, paths[i], state, seconds, percent);
|
||||
}
|
||||
|
||||
if (dbus) {
|
||||
dbus->free_string_array(paths);
|
||||
}
|
||||
#endif /* SDL_USE_LIBDBUS */
|
||||
|
||||
return retval;
|
||||
|
|
|
@ -1078,7 +1078,7 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)
|
|||
/* new textures start at zero, so we start at 1 so first render doesn't flush by accident. */
|
||||
renderer->render_command_generation = 1;
|
||||
|
||||
if (window && renderer->GetOutputSize) {
|
||||
if (renderer->GetOutputSize) {
|
||||
int window_w, window_h;
|
||||
int output_w, output_h;
|
||||
if (renderer->GetOutputSize(renderer, &output_w, &output_h) == 0) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -308,8 +308,8 @@ KMSDRM_CreateDevice(void)
|
|||
return device;
|
||||
|
||||
cleanup:
|
||||
if (device)
|
||||
SDL_free(device);
|
||||
|
||||
if (viddata)
|
||||
SDL_free(viddata);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue