[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Fri May 11 14:26:06 UTC 2018


 vcl/source/control/tabctrl.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 3aa01898e58c4a3bea64fea33778ac455f1f5253
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 11 09:31:02 2018 +0100

    tdf#117549 crash with focus setting during disposing
    
    Change-Id: I1ab492a4c6fab89debac90224a5f78102d33d664
    Reviewed-on: https://gerrit.libreoffice.org/54122
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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));


More information about the Libreoffice-commits mailing list