Skip to content

Segfault on deletion of an item residing in the container stack#2624

Merged
hoffstadt merged 1 commit intohoffstadt:masterfrom
v-ein:bugfix/container-stack-deletion
Apr 6, 2026
Merged

Segfault on deletion of an item residing in the container stack#2624
hoffstadt merged 1 commit intohoffstadt:masterfrom
v-ein:bugfix/container-stack-deletion

Conversation

@v-ein
Copy link
Copy Markdown
Collaborator

@v-ein v-ein commented Mar 28, 2026


name: Pull Request
about: Create a pull request to help us improve
title: Segfault on deletion of an item residing in the container stack
assignees: @hoffstadt


Description:
The container stack stores raw mvAppItem pointers, which makes item deletion potentially unsafe. Of course nobody in their right mind would delete an item being in the container stack (because it's unclear what's expected of the stack then), but just in case someone does, DPG must handle it gracefully.

This PR changes the container stack to use shared_ptr and therefore prevents the segfault. If the item being deleted is still on the container stack, it will be destroyed once it's popped from the stack.

Concerning Areas:
None.

@v-ein v-ein requested a review from hoffstadt March 28, 2026 21:05
@hoffstadt hoffstadt merged commit eebccea into hoffstadt:master Apr 6, 2026
4 checks passed
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