Skip to content

Commit 6d8e396

Browse files
Prevent null pointer access
1 parent e4a7198 commit 6d8e396

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/DockAreaTitleBar.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,13 @@ void CDockAreaTitleBar::onTabsMenuActionTriggered(QAction* Action)
390390
//============================================================================
391391
void CDockAreaTitleBar::updateDockWidgetActionsButtons()
392392
{
393-
CDockWidget* DockWidget = d->TabBar->currentTab()->dockWidget();
393+
auto Tab = d->TabBar->currentTab();
394+
if (!Tab)
395+
{
396+
return;
397+
}
398+
399+
CDockWidget* DockWidget = Tab->dockWidget();
394400
if (!d->DockWidgetActionsButtons.isEmpty())
395401
{
396402
for (auto Button : d->DockWidgetActionsButtons)

0 commit comments

Comments
 (0)