mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 05:05:43 +08:00
Fix DockWidget crach when area is a nullptr. (#582)
When requesting hide on a dockwidget that has been added to a dockmanager, but isn't yet visible, there was a creash. The crash has been fixed by moving the code to the existing guard check for the area. Co-authored-by: Thorbjørn Lund Martsum <thorbjorn@luxion.com>
This commit is contained in:
parent
a2c94c16b5
commit
5d6831d179
@ -749,11 +749,10 @@ void CDockWidget::toggleViewInternal(bool Open)
|
||||
if (d->DockArea)
|
||||
{
|
||||
d->DockArea->toggleDockWidgetView(this, Open);
|
||||
}
|
||||
|
||||
if (d->DockArea->isAutoHide())
|
||||
{
|
||||
d->DockArea->autoHideDockContainer()->toggleView(Open);
|
||||
if (d->DockArea->isAutoHide())
|
||||
{
|
||||
d->DockArea->autoHideDockContainer()->toggleView(Open);
|
||||
}
|
||||
}
|
||||
|
||||
if (Open && TopLevelDockWidgetBefore)
|
||||
|
Loading…
Reference in New Issue
Block a user