Skip to content

Commit b82d23e

Browse files
Guard against null pointer access
1 parent 6d8e396 commit b82d23e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/DockAreaWidget.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,11 @@ void CDockAreaWidget::insertDockWidget(int index, CDockWidget* DockWidget,
452452
void CDockAreaWidget::removeDockWidget(CDockWidget* DockWidget)
453453
{
454454
ADS_PRINT("CDockAreaWidget::removeDockWidget");
455+
if (!DockWidget)
456+
{
457+
return;
458+
}
459+
455460
auto CurrentDockWidget = currentDockWidget();
456461
auto NextOpenDockWidget = (DockWidget == CurrentDockWidget) ? nextOpenDockWidget(DockWidget) : nullptr;
457462

0 commit comments

Comments
 (0)