From 2ef7fa727e2596d92b785a0628765fd6094b740f Mon Sep 17 00:00:00 2001 From: Chertkov Alexandr Date: Thu, 17 Nov 2022 16:01:23 +0300 Subject: [PATCH] Fix crash, after restoreState of CDockManager. --- src/DockAreaTitleBar.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DockAreaTitleBar.cpp b/src/DockAreaTitleBar.cpp index 8651d29..7dfa0d9 100644 --- a/src/DockAreaTitleBar.cpp +++ b/src/DockAreaTitleBar.cpp @@ -390,7 +390,11 @@ void CDockAreaTitleBar::onTabsMenuActionTriggered(QAction* Action) //============================================================================ void CDockAreaTitleBar::updateDockWidgetActionsButtons() { - CDockWidget* DockWidget = d->TabBar->currentTab()->dockWidget(); + auto Tab = d->TabBar->currentTab(); + if (!Tab) + return; + + CDockWidget* DockWidget = Tab->dockWidget(); if (!d->DockWidgetActionsButtons.isEmpty()) { for (auto Button : d->DockWidgetActionsButtons)