summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-05-10 19:31:23 +0200
committerJulien Nabet <serval2412@yahoo.fr>2023-05-10 21:44:07 +0200
commitb70803101f454fce0461650d22d57a6adb5f5a87 (patch)
tree9e313f67f853c682cda3e4023320282d96da9995 /chart2/source/controller
parent24cc6f7e21844c078b8db4c505df5ca3983450b3 (diff)
tdf#155231: fix CRASH: with embedded OLE chart
First bt: 6 0x00007f19f96b29b2 in rtl::Reference<chart::Diagram>::operator->() const (this=0x55f40881f1f0) at include/rtl/ref.hxx:216 7 0x00007f19f97b0a03 in chart::DialogModel::isCategoryDiagram() const (this=0x55f407cfffb0) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/DialogModel.cxx:656 8 0x00007f19f983ab1a in chart::DataSourceTabPage::updateControlState() (this=0x55f408bdd840) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:439 9 0x00007f19f983a954 in chart::DataSourceTabPage::SeriesSelectionChangedHdl(weld::TreeView&) (this=0x55f408bdd840) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:469 10 0x00007f19f98380e2 in chart::DataSourceTabPage::updateControlsFromDialogModel() (this=0x55f408bdd840) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:313 see full bt here: https://bugs.documentfoundation.org/attachment.cgi?id=187190 Second part bt: 6 0x00007fc66e0b29b2 in rtl::Reference<chart::Diagram>::operator->() const (this=0x7ffce5f5c9b0) at include/rtl/ref.hxx:216 7 0x00007fc66e1b00d8 in chart::DialogModel::getCategories() const (this=0x5590bff92f10) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/DialogModel.cxx:601 8 0x00007fc66e1b0474 in chart::DialogModel::getCategoriesRange() const (this=0x5590bff92f10) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/DialogModel.cxx:637 9 0x00007fc66e238141 in chart::DataSourceTabPage::updateControlsFromDialogModel() (this=0x5590c00c4030) at /home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:316 Regression from: commit 5a4b75dcb5abc2e925870614a28e1c2876df8ed9 (patch) tree 5fe1f89c70f9c6d90d3eea8f9eb9a68e91f2dec0 parent dab0d4e1f36faace21145a51733bd3a946992624 (diff) use more concrete types in chart2, Diagram Change-Id: I4332a237248c5acacab7180733d502f049aead96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151642 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 032ec26dc912..9458f82bb13d 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -598,7 +598,8 @@ uno::Reference< chart2::data::XLabeledDataSequence > DialogModel::getCategories(
if( m_xChartDocument.is())
{
rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram());
- xResult = xDiagram->getCategories();
+ if (xDiagram.is())
+ xResult = xDiagram->getCategories();
}
}
catch( const uno::Exception & )
@@ -652,7 +653,7 @@ OUString DialogModel::getCategoriesRange() const
bool DialogModel::isCategoryDiagram() const
{
bool bRet = false;
- if( m_xChartDocument.is())
+ if( m_xChartDocument.is() && m_xChartDocument->getFirstChartDiagram())
bRet = m_xChartDocument->getFirstChartDiagram()->isCategory();
return bRet;
}