diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-11 09:31:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-11 16:25:42 +0200 |
commit | 3aa01898e58c4a3bea64fea33778ac455f1f5253 (patch) | |
tree | f25c3b983877a826c5bb7be55fdeb231ece69226 /vcl | |
parent | ce5cd1c1c5cd23a1704d561dc3b53cbaf2d6f01a (diff) |
tdf#117549 crash with focus setting during disposing
Change-Id: I1ab492a4c6fab89debac90224a5f78102d33d664
Reviewed-on: https://gerrit.libreoffice.org/54122
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 5 |
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)); |