mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 13:16:43 -05:00
Fixed bug #638
Philipp Nordhus 2008-11-05 13:56:33 PST The Linux version of SDL_SYS_JoystickQuit() tries to free an invalid pointer when the number of joysticks was reduced since the last call. Reproduce: Connect two joysticks, call SDL_Init() and SDL_Quit(), then disconnect one joystick and call the functions again. --HG-- branch : SDL-1.2
This commit is contained in:
@@ -1191,8 +1191,8 @@ void SDL_SYS_JoystickQuit(void)
|
||||
|
||||
for ( i=0; SDL_joylist[i].fname; ++i ) {
|
||||
SDL_free(SDL_joylist[i].fname);
|
||||
SDL_joylist[i].fname = NULL;
|
||||
}
|
||||
SDL_joylist[0].fname = NULL;
|
||||
}
|
||||
|
||||
#endif /* SDL_JOYSTICK_LINUX */
|
||||
|
||||
Reference in New Issue
Block a user