[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 1 13:04:23 UTC 2018


 sw/source/core/text/pormulti.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 518210ad681bc0721c57c56e625abcb6429dd693
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 1 11:25:22 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 1 15:03:57 2018 +0200

    forcepoint#61 null deref
    
    Change-Id: Ia22f1df0ce3a49a8cb9b11e35895f9d1e13a2e05
    Reviewed-on: https://gerrit.libreoffice.org/58406
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 13b7207b71d9..78423e440a6f 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -2094,11 +2094,13 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
 
             BuildPortions( aTmp );
 
-            if ( rMulti.OnRight() )
+            const SwLinePortion *pRightPortion = rMulti.OnRight() ?
+                                                 rMulti.GetRoot().GetNext()->GetPortion() : nullptr;
+            if (pRightPortion)
             {
                 // The ruby text on the right is vertical.
                 // The width and the height are swapped.
-                SwTwips nHeight = rMulti.GetRoot().GetNext()->GetPortion()->Height();
+                SwTwips nHeight = pRightPortion->Height();
                 // Keep room for the ruby text.
                 rMulti.GetRoot().FindLastPortion()->AddPrtWidth( nHeight );
             }


More information about the Libreoffice-commits mailing list