cid#1401328 Uncaught exception

and

cid#1401334 Uncaught exception

Change-Id: I609ec44bf28db28e69533d7b795f705fa8a330f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115228
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 1b77a6f..6f1d1fc 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -567,11 +567,11 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const
                if ( rSpace.GetTextFirstLineOffset() > 0 )
                    aPos.AdjustX(rSpace.GetTextFirstLineOffset() );

                std::unique_ptr<SwSaveClip> pClip;
                std::unique_ptr<SwSaveClip, o3tl::default_delete<SwSaveClip>> xClip;
                if( IsUndersized() )
                {
                    pClip.reset(new SwSaveClip( pSh->GetOut() ));
                    pClip->ChgClip( rRect );
                    xClip.reset(new SwSaveClip( pSh->GetOut() ));
                    xClip->ChgClip( rRect );
                }

                aPos.AdjustY(pFnt->GetAscent( pSh, *pSh->GetOut() ) );