mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-19 17:58:13 +00:00
Potential fix for a crash we're seeing on Android that should in theory never happen.
This commit is contained in:
@@ -1044,7 +1044,10 @@ SDL_JoystickUpdate(void)
|
|||||||
|
|
||||||
for (joystick = SDL_joysticks; joystick; joystick = joystick->next) {
|
for (joystick = SDL_joysticks; joystick; joystick = joystick->next) {
|
||||||
if (joystick->attached) {
|
if (joystick->attached) {
|
||||||
joystick->driver->Update(joystick);
|
/* This should always be true, but seeing a crash in the wild...? */
|
||||||
|
if (joystick->driver) {
|
||||||
|
joystick->driver->Update(joystick);
|
||||||
|
}
|
||||||
|
|
||||||
if (joystick->delayed_guide_button) {
|
if (joystick->delayed_guide_button) {
|
||||||
SDL_GameControllerHandleDelayedGuideButton(joystick);
|
SDL_GameControllerHandleDelayedGuideButton(joystick);
|
||||||
|
Reference in New Issue
Block a user