diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-01 11:25:22 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-08-03 10:51:01 +0200 |
commit | 8f3922d3485fbaec032458653f42ccfcbab88e84 (patch) | |
tree | 895e033dd612f0c386e29dffe22a2095e780bbe1 /sw/source | |
parent | b15da0141d884b72d01381c133a7212061df3c39 (diff) |
forcepoint#61 null deref
Change-Id: Ia22f1df0ce3a49a8cb9b11e35895f9d1e13a2e05
Reviewed-on: https://gerrit.libreoffice.org/58407
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/text/pormulti.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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 ); } |