Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid dock manager double delete (crashes) #587

Conversation

tmartsum
Copy link

@tmartsum tmartsum commented Dec 6, 2023

If a dockwidget has been manually deleted, the dockmanager would delete it again when deleting the area in its dtor.
The 'optimal' solution would likely have been changing CDockWidget::~CDockWidget to add
if (d->DockArea) d->DockArea->removeDockWidget(this); (before delete d).
However, it is not trivial (for me) to conclude that such a change would be safe on program shutdown.

If a dockwidget has been manually deleted, the dockmanager
would delete it again when deleting the area in its dtor.
The 'optimal' solution would likely have been changing
CDockWidget::~CDockWidget to add
if (d->DockArea) d->DockArea->removeDockWidget(this);
(before delete d).
However, it is not trivial (for me) to conclude that such
a change would be safe on program shutdown.
@githubuser0xFFFF
Copy link
Owner

Thank you.

@githubuser0xFFFF githubuser0xFFFF merged commit c34d479 into githubuser0xFFFF:master Dec 6, 2023
1 check was pending
@tmartsum tmartsum deleted the bugfix/avoid_dockmgr_delete_of_deleted_objects branch December 7, 2023 06:37
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.

None yet

2 participants