src/joystick/beos/SDL_bejoystick.cc
changeset 7719 31b5f9ff36ca
parent 7191 75360622e65f
equal deleted inserted replaced
7718:213b9777e988 7719:31b5f9ff36ca
   229     void SDL_SYS_JoystickClose(SDL_Joystick * joystick)
   229     void SDL_SYS_JoystickClose(SDL_Joystick * joystick)
   230     {
   230     {
   231         if (joystick->hwdata) {
   231         if (joystick->hwdata) {
   232             joystick->hwdata->stick->Close();
   232             joystick->hwdata->stick->Close();
   233             delete joystick->hwdata->stick;
   233             delete joystick->hwdata->stick;
   234             if (joystick->hwdata->new_hats) {
   234             SDL_free(joystick->hwdata->new_hats);
   235                 SDL_free(joystick->hwdata->new_hats);
   235             SDL_free(joystick->hwdata->new_axes);
   236             }
       
   237             if (joystick->hwdata->new_axes) {
       
   238                 SDL_free(joystick->hwdata->new_axes);
       
   239             }
       
   240             SDL_free(joystick->hwdata);
   236             SDL_free(joystick->hwdata);
   241             joystick->hwdata = NULL;
   237             joystick->hwdata = NULL;
   242         }
   238         }
   243     }
   239     }
   244 
   240