summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/text.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-09 11:13:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-09 11:15:24 +0100
commit3144b8deaf8397d719b7ad7a56b309655a53d90a (patch)
treea0a4fa61ec78504210adf847aaa8bcd89d4fd841 /vcl/source/outdev/text.cxx
parent912ecaf565e68d2ca3fb9584712313e712749f75 (diff)
Resolves: fdo#84809 crash when button is too short for text
regression from 4c539fac018dfd44cd8db52161a8cb930c627da7 commit 4c539fac018dfd44cd8db52161a8cb930c627da7 Date: Tue Dec 17 05:18:35 2013 -0600 vcl get rid of xub_StrLen and STRING_LEN in outdev3 before this there was a dubious cast which hid the problem Change-Id: I7c01c0f0ac211196a62acaf02297f29ae829403d
Diffstat (limited to 'vcl/source/outdev/text.cxx')
-rw-r--r--vcl/source/outdev/text.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 6919746f47e0..9dced6c6d6dd 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1582,7 +1582,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
long nMaxTextWidth = ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, _rLayout );
nLines = (sal_Int32)(nHeight/nTextHeight);
nFormatLines = aMultiLineInfo.Count();
- if ( !nLines )
+ if (nLines <= 0)
nLines = 1;
if ( nFormatLines > nLines )
{