We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 638 - SDL_Quit crashes when number of joysticks has changed
Summary: SDL_Quit crashes when number of joysticks has changed
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 1.2.13
Hardware: All Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-1.2.14
Depends on:
Blocks:
 
Reported: 2008-11-05 13:56 UTC by Philipp Nordhus
Modified: 2009-09-21 04:35 UTC (History)
1 user (show)

See Also:


Attachments
Patch for SDL 1.2.13 (289 bytes, patch)
2008-11-05 13:57 UTC, Philipp Nordhus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Nordhus 2008-11-05 13:56:33 UTC
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.
Comment 1 Philipp Nordhus 2008-11-05 13:57:46 UTC
Created attachment 282 [details]
Patch for SDL 1.2.13
Comment 2 Ryan C. Gordon 2009-09-13 16:33:25 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.
Comment 3 Sam Lantinga 2009-09-21 04:35:34 UTC
This is fixed for SDL 1.2.14, thanks!