diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-21 09:53:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-23 13:12:55 +0200 |
commit | 8396cce9b5d9a4e3cdccc558eb1b818460f0987a (patch) | |
tree | c573d21f50405516245cbfc11630c589a098a855 /vcl/source/gdi | |
parent | 763114f8b7a7705e1b28226da33bf00016ad7982 (diff) |
clean up places accessing the NULL at the of an OUString
There were only a couple of real bugs fixed, but we're a little
bit safer now.
This also fixes the assert and the comment in OUString::operator[]
about this.
Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index a9de9725edfe..d8ec0e69aef1 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -4843,7 +4843,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, nBreakPos++; nPos = nBreakPos; - if ( ( rStr[ nPos ] == '\r' ) || ( rStr[ nPos ] == '\n' ) ) + if ( nPos < nLen && ( ( rStr[ nPos ] == '\r' ) || ( rStr[ nPos ] == '\n' ) ) ) { nPos++; // CR/LF? |