summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/Sidebar.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/sidebar/Sidebar.cxx')
-rw-r--r--sfx2/source/sidebar/Sidebar.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/sfx2/source/sidebar/Sidebar.cxx b/sfx2/source/sidebar/Sidebar.cxx
index 02a17f43b8be..2fa29f4a6788 100644
--- a/sfx2/source/sidebar/Sidebar.cxx
+++ b/sfx2/source/sidebar/Sidebar.cxx
@@ -30,19 +30,21 @@ void Sidebar::ShowPanel (
const css::uno::Reference<frame::XFrame>& rxFrame)
{
SidebarController* pController = SidebarController::GetSidebarControllerForFrame(rxFrame);
+ if (!pController)
+ return;
std::shared_ptr<PanelDescriptor> xPanelDescriptor = pController->GetResourceManager()->GetPanelDescriptor(rsPanelId);
- if (pController && xPanelDescriptor)
- {
- // This should be a lot more sophisticated:
- // - Make the deck switching asynchronous
- // - Make sure to use a context that really shows the panel
+ if (!xPanelDescriptor)
+ return;
+
+ // This should be a lot more sophisticated:
+ // - Make the deck switching asynchronous
+ // - Make sure to use a context that really shows the panel
- // All that is not necessary for the current use cases so lets
- // keep it simple for the time being.
- pController->OpenThenSwitchToDeck(xPanelDescriptor->msDeckId);
- }
+ // All that is not necessary for the current use cases so lets
+ // keep it simple for the time being.
+ pController->OpenThenSwitchToDeck(xPanelDescriptor->msDeckId);
}
void Sidebar::TogglePanel (