summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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);
}