Skip to content
Permalink
Browse files

Android: Fixed crash if closing removed joystick (thanks, Sylvain!).

Fixes fix for Bugzilla #3408.
  • Loading branch information
philippwiesemann committed Aug 25, 2016
1 parent 5150eb3 commit e41e185eabbaf3a9ab5501228907247b71785b88
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/joystick/android/SDL_sysjoystick.c
@@ -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 */

0 comments on commit e41e185

Please sign in to comment.