1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

CDockAreaWidget::removeDockWidget: guard against nullpointer crash

This commit is contained in:
fb 2022-11-15 21:23:35 +01:00
parent 6573ac7e2d
commit b9718cdd5d

View File

@ -452,6 +452,8 @@ void CDockAreaWidget::insertDockWidget(int index, CDockWidget* DockWidget,
void CDockAreaWidget::removeDockWidget(CDockWidget* DockWidget)
{
ADS_PRINT("CDockAreaWidget::removeDockWidget");
if(DockWidget == nullptr)
return;
auto CurrentDockWidget = currentDockWidget();
auto NextOpenDockWidget = (DockWidget == CurrentDockWidget) ? nextOpenDockWidget(DockWidget) : nullptr;