summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2020-12-09 18:39:54 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-05-23 10:42:23 +0200
commitce97861c1090e06493fa5fc823ed7795ba46e1e1 (patch)
treeacbbdadc68858a596a813303e0edcb34d03a7d44
parenttdf#148235 Restore toolbar item to switch XForm to design mode (diff)
downloadcore-ce97861c1090e06493fa5fc823ed7795ba46e1e1.tar.gz
core-ce97861c1090e06493fa5fc823ed7795ba46e1e1.zip
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@collabora.com> (cherry picked from commit 7e5991dc695d1e590483615c2907811ce4117834) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107544 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 6161967f7920..21bef3138456 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -630,10 +630,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);
}