diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-06-08 15:23:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-06-08 20:42:55 +0200 |
commit | 260bc16e1923016d0628a8779e219b290d4c9011 (patch) | |
tree | 1121de88408478da9e551c3b0c2eb86e990dfc16 | |
parent | 3fe8d0e47418c4ce47a6ae6802ccbb0dd496f853 (diff) |
check for empty model like ObjectIdentifier::getObjectPropertySet
a speculative fix for:
https://crashreport.libreoffice.org/stats/crash_details/5b3c8597-9ffa-49b8-8cc2-132e69456249
Change-Id: I4f45cf4c7ed51c814d4cb01b8f55709586d7a981
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152745
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | chart2/source/controller/sidebar/ChartColorWrapper.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index e1011a684787..aee8483cadf4 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -39,6 +39,9 @@ namespace { OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel) { + if (!xModel.is()) + return OUString(); + css::uno::Reference<css::frame::XController> xController(xModel->getCurrentController()); css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY); if (!xSelectionSupplier.is()) |