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

New commits:
commit 8f3922d3485fbaec032458653f42ccfcbab88e84
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Aug 1 11:25:22 2018 +0100
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Fri Aug 3 10:51:01 2018 +0200

    forcepoint#61 null deref
    
    Change-Id: Ia22f1df0ce3a49a8cb9b11e35895f9d1e13a2e05
    Reviewed-on: https://gerrit.libreoffice.org/58407
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>

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 );
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to