diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-10-09 00:57:13 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-10-13 16:10:29 +0000 |
commit | 0e8045fd2365c5adf986cd845d4d1a185ffe0aeb (patch) | |
tree | ecbc627288832ba60d69c0b476be33d148375f3f | |
parent | cf5d6ccea23549aea708c6e399a982598b2b58aa (diff) |
avoid crashes on broken charts, related tdf#98690
Change-Id: If81f963babc15fc549d9daa904fd9836ea02ecef
(cherry picked from commit c3cc9429d136178996d797ef8fd6d740b39cc94e)
Reviewed-on: https://gerrit.libreoffice.org/29683
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 5085223542aa..3992def14f98 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -315,7 +315,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: @@ -330,7 +330,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: |