hwpfilter/source/hwpreader.cxx  |    2 +-
 svx/source/unodraw/unoshape.cxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d26d26b2c3052a97422005e864861c4d6f6f1482
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Mar 3 09:18:23 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Mar 3 17:01:57 2022 +0100

    ofz: Null-dereference
    
    Change-Id: I107f6b4e88ad4b472614331010cd2fa45a865f9b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130908
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 6209445f40c8..5729f5ebecf3 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3942,7 +3942,7 @@ void HwpReader::makePicture(Picture * hbox)
             if( hbox->style.cap_len > 0 )
             {
                 rendEl( "text:p");
-                if( !(hbox->cap_pos % 2))         /* Caption is at the bottom, 
*/
+                if (!hbox->caption.empty() && !(hbox->cap_pos % 2))         /* 
Caption is at the bottom, */
                 {
                     parsePara(hbox->caption.front().get());
                 }
commit fba41eff279df015d24cf8faee7d4ff85ef32fac
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Thu Mar 3 11:55:06 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Mar 3 17:01:44 2022 +0100

    assert more in SvxShape
    
    Change-Id: I98812e4cd70ced6d493f558844832e8c0c99b684
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130914
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 8ccfde1b8b12..cd301d7b5480 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -374,12 +374,12 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* 
/*pNewPage*/ )
 {
     DBG_TESTSOLARMUTEX();
 
-    OSL_PRECOND( pNewObj, "SvxShape::Create: invalid new object!" );
+    assert( pNewObj && "SvxShape::Create: invalid new object!" );
     if ( !pNewObj )
         return;
 
     SdrObject* pCreatedObj = mpSdrObjectWeakReference.get();
-    OSL_ENSURE( ( pCreatedObj == nullptr ) || ( pCreatedObj == pNewObj ),
+    assert( ( !pCreatedObj || ( pCreatedObj == pNewObj ) ) &&
         "SvxShape::Create: the same shape used for two different objects?! 
Strange ..." );
 
     // Correct condition (#i52126#)

Reply via email to