Skip to content

Commit

Permalink
Android: Fixed crash if closing removed joystick (thanks, Sylvain!).
Browse files Browse the repository at this point in the history
Fixes fix for Bugzilla #3408.
  • Loading branch information
philippwiesemann committed Aug 25, 2016
1 parent 5150eb3 commit e41e185
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/joystick/android/SDL_sysjoystick.c
Expand Up @@ -539,7 +539,9 @@ void
SDL_SYS_JoystickClose(SDL_Joystick * joystick)
{
SDL_joylist_item *item = (SDL_joylist_item *) joystick->hwdata;
item->joystick = NULL;
if (item) {
item->joystick = NULL;
}
}

/* Function to perform any system-specific joystick related cleanup */
Expand Down

0 comments on commit e41e185

Please sign in to comment.