mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Avoid dock manager double delete (crashes) (#587)
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. Co-authored-by: Thorbjørn Lund Martsum <thorbjorn@luxion.com>
This commit is contained in:
parent
a7a97e6978
commit
c34d479d5c
@ -81,7 +81,7 @@ class CDockAreaLayout
|
||||
{
|
||||
private:
|
||||
QBoxLayout* m_ParentLayout;
|
||||
QList<QWidget*> m_Widgets;
|
||||
QList<QPointer<QWidget>> m_Widgets;
|
||||
int m_CurrentIndex = -1;
|
||||
QWidget* m_CurrentWidget = nullptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user