sw/source/filter/ww8/docxsdrexport.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 623abd5df5e6a9932fc2a00d8790f288f19c9182
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Feb 5 09:18:28 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sat Feb 6 11:00:43 2021 +0100

    cid#1472784 Dereference null return value
    
    Change-Id: Ifb6dc31b00ea170923d8cdb636185275e6877ca2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110457
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 27116bceb349..98f7c2d98e28 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -795,15 +795,13 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
                 m_pImpl->getSerializer()->endElementNS(XML_wp, nWrapToken);
             }
         }
-        else
+        else if (SdrObject* pSdrObj = 
const_cast<SdrObject*>(pFrameFormat->FindRealSdrObject()))
         {
             // In this case we likely had an odt document to be exported to 
docx.
             // There is no grab-bag or something else so for a workaround,
             // let's export the geometry of the shape...
             // First get the UNO-shape
-            uno::Reference<drawing::XShape> xShape(
-                
const_cast<SdrObject*>(pFrameFormat->FindRealSdrObject())->getUnoShape(),
-                uno::UNO_QUERY);
+            uno::Reference<drawing::XShape> xShape(pSdrObj->getUnoShape(), 
uno::UNO_QUERY);
 
             if (xShape && xShape->getShapeType() == 
u"com.sun.star.drawing.CustomShape")
             {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to