[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - chart2/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed Jan 3 16:25:23 UTC 2018
chart2/source/controller/sidebar/ChartElementsPanel.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 97db3448de9937116ebf008961e3321811bd44ec
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Dec 21 23:42:19 2017 +0100
prevent crash when trying to edit broken chart documents
Change-Id: Ie5fb706011ca600b42e5e2d3770e919b56347edd
Reviewed-on: https://gerrit.libreoffice.org/46938
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit 1d2eb0b64339a771152bb17831c83373830e5c38)
Reviewed-on: https://gerrit.libreoffice.org/47005
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 6ee81319f591..612fe89565e6 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -398,10 +398,16 @@ css::uno::Reference<css::chart2::XChartType> getChartType(const css::uno::Refere
css::uno::Sequence<css::uno::Reference<css::chart2::XCoordinateSystem>> xCooSysSequence(xCooSysContainer->getCoordinateSystems());
+ if (xCooSysSequence.getLength() == 0)
+ return css::uno::Reference<css::chart2::XChartType>();
+
css::uno::Reference<css::chart2::XChartTypeContainer> xChartTypeContainer(xCooSysSequence[0], css::uno::UNO_QUERY_THROW);
css::uno::Sequence<css::uno::Reference<css::chart2::XChartType>> xChartTypeSequence(xChartTypeContainer->getChartTypes());
+ if (xChartTypeSequence.getLength() == 0)
+ return css::uno::Reference<css::chart2::XChartType>();
+
return xChartTypeSequence[0];
}
More information about the Libreoffice-commits
mailing list