[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source

Aron Budea (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 18 11:04:57 UTC 2020


 sfx2/source/sidebar/SidebarController.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 49b7d99af0edc46793c9955061eaee78e7f7822f
Author:     Aron Budea <aron.budea at collabora.com>
AuthorDate: Wed Dec 9 18:39:54 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Dec 18 12:04:22 2020 +0100

    tdf#138762: crash when trying to open sidebar w chart in Writer
    
    In Writer when in chart edit mode, and the chart is deselected,
    the object selection remains. Opening Properties sidebar at
    this point crashed. Calc and Impress were unaffected.
    
    Regression from b5fdb148fe87a90f3e586efcea7aa6ef865fa42a
    
    Change-Id: I356c3a42c41dd38e4739df27c72c6d67722b1dbc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107500
    Tested-by: Jenkins
    Reviewed-by: Aron Budea <aron.budea at collabora.com>
    (cherry picked from commit 7e5991dc695d1e590483615c2907811ce4117834)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107544
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index ba61d0c23a11..d6c1103850e2 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -622,10 +622,13 @@ void SidebarController::OpenThenToggleDeck (
     SwitchToDeck(rsDeckId);
 
     // Make sure the sidebar is wide enough to fit the requested content
-    sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + TabBar::GetDefaultWidth())
-                                * mpTabBar->GetDPIScaleFactor();
-    if (mnSavedSidebarWidth < nRequestedWidth)
-        SetChildWindowWidth(nRequestedWidth);
+    if (mpCurrentDeck && mpTabBar)
+    {
+        sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + TabBar::GetDefaultWidth())
+                                    * mpTabBar->GetDPIScaleFactor();
+        if (mnSavedSidebarWidth < nRequestedWidth)
+            SetChildWindowWidth(nRequestedWidth);
+    }
 
     collectUIInformation(rsDeckId);
 }


More information about the Libreoffice-commits mailing list