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 5084 - [PATCH] NULL out pointer to freed window surface
Summary: [PATCH] NULL out pointer to freed window surface
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-12 05:09 UTC by Jay Petacat
Modified: 2020-04-13 15:12 UTC (History)
0 users

See Also:


Attachments
Patch (1002 bytes, patch)
2020-04-12 05:09 UTC, Jay Petacat
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Petacat 2020-04-12 05:09:20 UTC
Created attachment 4300 [details]
Patch

This behavior matches SDL_RecreateWindow and makes it less likely that
another piece of code (e.g. a DestroyWindowFramebuffer implementation)
will attempt to use or free the stale surface pointer.
Comment 1 Sam Lantinga 2020-04-13 15:12:28 UTC
Good catch, thanks!
https://hg.libsdl.org/SDL/rev/458f2f2919ab