Skip to content

null out editor-dialog globals on DestroyWindow#7512

Merged
wookieejedi merged 1 commit into
scp-fs2open:masterfrom
Goober5000:cleanup/fred_destroy_window
Jun 12, 2026
Merged

null out editor-dialog globals on DestroyWindow#7512
wookieejedi merged 1 commit into
scp-fs2open:masterfrom
Goober5000:cleanup/fred_destroy_window

Conversation

@Goober5000

Copy link
Copy Markdown
Contributor

Several dialogs already null their global at the top of DestroyWindow, but a few do not: briefing, debriefing, event, background, message, cutscene, goal, and Fred_view_wnd. OnClose nulls in those five cover the user-initiated close path, but any teardown that bypasses OnClose leaves a dangling pointer that could be dereferenced.

Several dialogs already null their global at the top of DestroyWindow, but a few do not: briefing, debriefing, event, background, message, cutscene, goal, and Fred_view_wnd.  OnClose nulls in those five cover the user-initiated close path, but any teardown that bypasses OnClose leaves a dangling pointer that could be dereferenced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Goober5000 Goober5000 added cleanup A modification or rewrite of code to make it more understandable or easier to maintain. fred A feature or issue related to the FReespace EDitor (FRED) labels Jun 8, 2026
@wookieejedi wookieejedi merged commit e4c7c73 into scp-fs2open:master Jun 12, 2026
20 checks passed
@Goober5000 Goober5000 deleted the cleanup/fred_destroy_window branch June 12, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup A modification or rewrite of code to make it more understandable or easier to maintain. fred A feature or issue related to the FReespace EDitor (FRED)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants