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 2132

Summary: Tests may use invalid SDL_window pointers when windows are closed
Product: SDL Reporter: norfanin
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: All   
Attachments: Mark destroyed windows with NULL and check for it in the tests.

Description norfanin 2013-10-03 21:02:05 UTC
Created attachment 1355 [details]
Mark destroyed windows with NULL and check for it in the tests.

Some of the tests keep using the pointers of a destroyed SDL_Window when the common event handling handled the close event. The event handler itself does not NULL the pointer after the destruction.

The attached patch adds a loop in the handler that will assign NULL to the destroyed window. It also adds checks to some of the tests so they skip those windows by checking for NULL.
Comment 1 Sam Lantinga 2013-10-06 02:09:31 UTC
Looks good, thanks!
http://hg.libsdl.org/SDL/rev/e6f3e8fc96ea