summaryrefslogtreecommitdiff
path: root/chart2/source/controller/main/ChartController.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/main/ChartController.cxx')
-rw-r--r--chart2/source/controller/main/ChartController.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index d6674cfc7da9..72fea5fc06dd 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -814,9 +814,8 @@ void SAL_CALL ChartController::dispose()
if (getModel().is())
{
uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getModel());
- if (xSidebar.is())
+ if (sfx2::sidebar::SidebarController* pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get()))
{
- sfx2::sidebar::SidebarController* pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get());
sfx2::sidebar::SidebarController::unregisterSidebarForFrame(pSidebar, this);
}
}