summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/control/tabctrl.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 36393f20906c..ba45738fa216 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2337,6 +2337,8 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
return false;
if ( mpTabCtrlData->maItemList.empty() )
return false;
+ if (!m_pOpenMenu || m_pOpenMenu->isDisposed())
+ return false;
long nMaxWidth = nWidth - HAMBURGER_DIM;
long nShortcutsWidth = m_pShortcuts != nullptr ? m_pShortcuts->GetSizePixel().getWidth() + 1 : 0;
@@ -2423,7 +2425,8 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
}
// position the shortcutbox
- m_pShortcuts->SetPosPixel(Point(0, 0));
+ if (m_pShortcuts)
+ m_pShortcuts->SetPosPixel(Point(0, 0));
// position the menu
m_pOpenMenu->SetPosPixel(Point(nWidth - HAMBURGER_DIM, 0));