src/joystick/emscripten/SDL_sysjoystick.c
changeset 10224 d1c27f616999
parent 10220 ba7dc3ebb81e
child 10226 cb13d22b7f09
equal deleted inserted replaced
10223:74c39dbe8d30 10224:d1c27f616999
   376 /* Function to close a joystick after use */
   376 /* Function to close a joystick after use */
   377 void
   377 void
   378 SDL_SYS_JoystickClose(SDL_Joystick * joystick)
   378 SDL_SYS_JoystickClose(SDL_Joystick * joystick)
   379 {
   379 {
   380     SDL_joylist_item *item = (SDL_joylist_item *) joystick->hwdata;
   380     SDL_joylist_item *item = (SDL_joylist_item *) joystick->hwdata;
   381     item->joystick = NULL;
   381     if (item) {
       
   382         item->joystick = NULL;
       
   383     }
   382 }
   384 }
   383 
   385 
   384 /* Function to perform any system-specific joystick related cleanup */
   386 /* Function to perform any system-specific joystick related cleanup */
   385 void
   387 void
   386 SDL_SYS_JoystickQuit(void)
   388 SDL_SYS_JoystickQuit(void)