summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-14 15:48:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-14 21:54:29 +0200
commitd12a200e69d4bedb4228c7632ec648e4fdc21fc2 (patch)
treedb896bf9dd8a5fa183f0ab7daa28c0f87d298986 /chart2
parent8d14c10639a4ff161e31156348c9928498df71ef (diff)
Resolves: tdf#117069 crash double clicking in certain chart
Change-Id: I4506a3517eff7f73cf793195e9d605d450b84fda Reviewed-on: https://gerrit.libreoffice.org/58997 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ChartController.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index a505335cfa9a..702c84a2f53c 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -265,6 +265,9 @@ css::uno::Reference<css::chart2::XChartType> getChartType(
Reference< chart2::XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::XCoordinateSystem > > xCooSysSequence( xCooSysContainer->getCoordinateSystems());
+ if (!xCooSysSequence.getLength()) {
+ return css::uno::Reference<css::chart2::XChartType>();
+ }
Reference< chart2::XChartTypeContainer > xChartTypeContainer( xCooSysSequence[0], uno::UNO_QUERY_THROW );