oox/source/drawingml/chart/converterbase.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 3d9e4c5995d582f4a15120e84adc36efa7b4a49e
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Dec 11 16:30:33 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Dec 11 19:25:50 2022 +0000

    crashtesting: null deref seen with forum-mso-en4-763051.xlsx
    
    Change-Id: I721ab5fc78efafac9bcb7594e881773863d867f6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143943
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/oox/source/drawingml/chart/converterbase.cxx 
b/oox/source/drawingml/chart/converterbase.cxx
index bf85b7c02360..d7130ec9795d 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <osl/diagnose.h>
+#include <sal/log.hxx>
 #include <basegfx/numeric/ftools.hxx>
 #include <oox/core/xmlfilterbase.hxx>
 #include <oox/helper/helper.hxx>
@@ -85,6 +86,11 @@ void TitleLayoutInfo::convertTitlePos( ConverterRoot const & 
rRoot, const Refere
     {
         // try to get the title shape
         Reference< XShape > xTitleShape = mpGetShape( rxChart1Doc );
+        if (!xTitleShape)
+        {
+            SAL_WARN("oox", "failed to get a TitleShape");
+            return;
+        }
         // get title rotation angle, needed for correction of position of 
top-left edge
         double fAngle = 0.0;
         PropertySet aTitleProp( mxTitle );

Reply via email to