src/joystick/windows/SDL_dxjoystick.c
changeset 7719 31b5f9ff36ca
parent 7712 66b5b8446275
child 7831 214cd9137ea9
     1.1 --- a/src/joystick/windows/SDL_dxjoystick.c	Thu Aug 29 08:27:25 2013 -0700
     1.2 +++ b/src/joystick/windows/SDL_dxjoystick.c	Thu Aug 29 08:29:21 2013 -0700
     1.3 @@ -834,7 +834,7 @@
     1.4  
     1.5              pListNext = pCurList->pNext;
     1.6              SDL_free(pCurList->joystickname);
     1.7 -            SDL_free( pCurList );
     1.8 +            SDL_free(pCurList);
     1.9              pCurList = pListNext;
    1.10          }
    1.11  
    1.12 @@ -1559,10 +1559,8 @@
    1.13          IDirectInputDevice8_Release(joystick->hwdata->InputDevice);
    1.14      }
    1.15  
    1.16 -    if (joystick->hwdata != NULL) {
    1.17 -        /* free system specific hardware data */
    1.18 -        SDL_free(joystick->hwdata);
    1.19 -    }
    1.20 +    /* free system specific hardware data */
    1.21 +    SDL_free(joystick->hwdata);
    1.22  
    1.23      joystick->closed = 1;
    1.24  }