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

New commits:
commit e92f7906527749f5b8148796d0bfb1a67387c4f0
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Aug 22 10:14:50 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Aug 22 15:07:44 2022 +0200

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

diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index d39af79a9d6f..acc1fde0d2b2 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1170,10 +1170,12 @@ void SwHTMLParser::InsertFloatingFrame()
 
 sal_uInt16 SwHTMLWriter::GuessOLENodeFrameType( const SwNode& rNode )
 {
-    SwOLEObj& rObj = const_cast<SwOLENode*>(rNode.GetOLENode())->GetOLEObj();
-
     SwHTMLFrameType eType = HTML_FRMTYPE_OLE;
 
+    SwOLENode* pOLENode = const_cast<SwOLENode*>(rNode.GetOLENode());
+    assert(pOLENode && "must exist");
+    SwOLEObj& rObj = pOLENode->GetOLEObj();
+
     uno::Reference < embed::XClassifiedObject > xClass = rObj.GetOleRef();
     SvGlobalName aClass( xClass->getClassID() );
     if( aClass == SvGlobalName( SO3_PLUGIN_CLASSID ) )

Reply via email to