summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/gdi/outdev3.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index d8ec0e69aef1..cc3096685a2c 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -6858,6 +6858,9 @@ OUString OutputDevice::GetNonMnemonicString( const OUString& rStr, sal_Int32& rM
{
if ( aStr[ i ] == '~' )
{
+ if ( nLen <= i+1 )
+ break;
+
if ( aStr[ i+1 ] != '~' )
{
if ( rMnemonicPos == -1 )