Skip to content

Fix crash when OnMapOpened delegate fires after SLevelEditorFlow destruction#362

Merged
MothDoctor merged 1 commit intoMothCocoon:5.xfrom
EvanC4:5.x
Apr 6, 2026
Merged

Fix crash when OnMapOpened delegate fires after SLevelEditorFlow destruction#362
MothDoctor merged 1 commit intoMothCocoon:5.xfrom
EvanC4:5.x

Conversation

@EvanC4
Copy link
Copy Markdown
Contributor

@EvanC4 EvanC4 commented Apr 3, 2026

The SLevelEditorFlow widget subscribes to FEditorDelegates::OnMapOpened using AddRaw, but never unsubscribes. When a map is loaded and the widget has been destroyed, the delegate fires on a stale pointer causing an access violation. Fix: Store the delegate handle and remove it in the destructor.

…ruction

The SLevelEditorFlow widget subscribes to FEditorDelegates::OnMapOpened using AddRaw, but never unsubscribes.
When a map is loaded and the widget has been destroyed, the delegate fires on a stale pointer causing an access violation.
Fix: Store the delegate handle and remove it in the destructor.
@MothDoctor MothDoctor self-assigned this Apr 6, 2026
@MothDoctor MothDoctor merged commit 31fd6f6 into MothCocoon:5.x Apr 6, 2026
@MothDoctor
Copy link
Copy Markdown
Contributor

Oh... Thanks for patching this up. Fix integrated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants