summaryrefslogtreecommitdiff
path: root/chart2/source/controller/sidebar/ChartColorWrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/sidebar/ChartColorWrapper.cxx')
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index bbaf95c56e7d..ae6480b8b40b 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -39,6 +39,9 @@ namespace {
OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
{
+ if (!xModel.is())
+ return OUString();
+
css::uno::Reference<css::frame::XController> xController(xModel->getCurrentController());
css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
if (!xSelectionSupplier.is())