summaryrefslogtreecommitdiff
path: root/sw/source/ui/chrdlg
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-04 11:31:14 +0000
committerAndras Timar <andras.timar@collabora.com>2015-02-23 10:30:48 +0100
commitbaa5f52108f6d13d1cace3166c1e785b1a5fcd92 (patch)
treefe88ad31c955b0eec42698025e3acf85ae5313ca /sw/source/ui/chrdlg
parent47e38347eb85e6a71363e4cea84c5de1916027be (diff)
tdf#88854 crash on opening drop caps
Change-Id: I3ab56e4909d2a20dc8f0bafe0273e81065296f17 (cherry picked from commit 727c3e088698dfd21cf4beaa5455d4c4d5b495fb) Reviewed-on: https://gerrit.libreoffice.org/14319 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit ccf8e201bd825df0227af8ab9161c11e9db05bc7)
Diffstat (limited to 'sw/source/ui/chrdlg')
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 5edfda138434..ff3b11f90e58 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -393,7 +393,9 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
rFnt.DrawPrev( this, mpPrinter, aPt, maText, nStart, nEnd - nStart );
- aPt.X() += maScriptChanges[ nIdx ].textWidth;
+ if (!maScriptChanges.empty())
+ aPt.X() += maScriptChanges[ nIdx ].textWidth;
+
if ( !GetNextScriptSegment(nIdx, nStart, nEnd, nScript) )
break;
}