chart2/source/controller/sidebar/ChartColorWrapper.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 057f959321d9244376788c8e390dfcd2269ceb7e
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Jun 8 15:23:04 2023 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Jun 9 11:24:34 2023 +0200

    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/+/152756
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index fc2f8b79839b..8835945548d1 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())

Reply via email to