static analysis: Fixed several complaints from codechecker.
There are still some pending Objective-C specific issues. Reference issue #4600.
This commit is contained in:
parent
eadc064e2c
commit
4fe7b2cbd1
10 changed files with 33 additions and 20 deletions
|
@ -1590,11 +1590,13 @@ SDL_JoystickUpdate(void)
|
|||
|
||||
for (joystick = SDL_joysticks; joystick; joystick = joystick->next) {
|
||||
if (joystick->attached) {
|
||||
/* This should always be true, but seeing a crash in the wild...? */
|
||||
if (joystick->driver) {
|
||||
joystick->driver->Update(joystick);
|
||||
/* This driver should always be != NULL, but seeing a crash in the wild...? */
|
||||
if (!joystick->driver) {
|
||||
continue; /* nothing we can do, and other things use joystick->driver below here. */
|
||||
}
|
||||
|
||||
joystick->driver->Update(joystick);
|
||||
|
||||
if (joystick->delayed_guide_button) {
|
||||
SDL_GameControllerHandleDelayedGuideButton(joystick);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue