mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-20 16:51:43 +00:00
Christoph Mallon: Remove pointless if (x) before SDL_free(x)
This commit is contained in:
@@ -834,7 +834,7 @@ void SDL_SYS_JoystickDetect()
|
||||
|
||||
pListNext = pCurList->pNext;
|
||||
SDL_free(pCurList->joystickname);
|
||||
SDL_free( pCurList );
|
||||
SDL_free(pCurList);
|
||||
pCurList = pListNext;
|
||||
}
|
||||
|
||||
@@ -1559,10 +1559,8 @@ SDL_SYS_JoystickClose(SDL_Joystick * joystick)
|
||||
IDirectInputDevice8_Release(joystick->hwdata->InputDevice);
|
||||
}
|
||||
|
||||
if (joystick->hwdata != NULL) {
|
||||
/* free system specific hardware data */
|
||||
SDL_free(joystick->hwdata);
|
||||
}
|
||||
/* free system specific hardware data */
|
||||
SDL_free(joystick->hwdata);
|
||||
|
||||
joystick->closed = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user