| 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. | ||
Looks good, thanks! http://hg.libsdl.org/SDL/rev/e6f3e8fc96ea |
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.