mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-03 06:09:20 +00:00
Don't do NULL-checks before SDL_free()
Replaces the pattern
if (ptr) {
SDL_free(ptr);
}
with
SDL_free(ptr);
This commit is contained in:
committed by
Sam Lantinga
parent
2f810e0a5f
commit
aaee09d6ed
@@ -1041,9 +1041,7 @@ static void SDLCALL OnlyControllersChanged(void *userdata, const char *name, con
|
||||
|
||||
static void SDLCALL IgnoredDevicesChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
|
||||
{
|
||||
if (SDL_hidapi_ignored_devices) {
|
||||
SDL_free(SDL_hidapi_ignored_devices);
|
||||
}
|
||||
SDL_free(SDL_hidapi_ignored_devices);
|
||||
if (hint && *hint) {
|
||||
SDL_hidapi_ignored_devices = SDL_strdup(hint);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user