summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-10-09 00:57:13 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-10-11 04:16:20 +0200
commitc3cc9429d136178996d797ef8fd6d740b39cc94e (patch)
treecccc2d1d73a96da3de003fa1fc069ab004a3e03e
parente2f6c7f0d0cc14f851d7028ff846c5dc658a81c6 (diff)
avoid crashes on broken charts, related tdf#98690
Change-Id: If81f963babc15fc549d9daa904fd9836ea02ecef
-rw-r--r--chart2/source/controller/main/ChartController.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 0f9dd7c4ae9b..1e2de86a2137 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -309,7 +309,7 @@ OUString ChartController::GetContextName()
ObjectType eObjectID = ObjectIdentifier::getObjectType(aCID);
- css::uno::Reference<css::chart2::XChartType> xChartType = getChartType(css::uno::Reference<css::chart2::XChartDocument>(getModel(), uno::UNO_QUERY_THROW));
+ css::uno::Reference<css::chart2::XChartType> xChartType = getChartType(css::uno::Reference<css::chart2::XChartDocument>(getModel(), uno::UNO_QUERY));
switch (eObjectID)
{
case OBJECTTYPE_DATA_SERIES:
@@ -324,7 +324,7 @@ OUString ChartController::GetContextName()
case OBJECTTYPE_GRID:
return OUString("Grid");
case OBJECTTYPE_DIAGRAM:
- if (xChartType->getChartType() == "com.sun.star.chart2.PieChartType")
+ if (xChartType.is() && xChartType->getChartType() == "com.sun.star.chart2.PieChartType")
return OUString("ChartElements");
break;
case OBJECTTYPE_DATA_CURVE: