summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
Diffstat (limited to 'forms')
-rw-r--r--forms/source/xforms/convert.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index c95d5fae6856..98fd3391f220 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -328,7 +328,7 @@ OUString Convert::collapseWhitespace( const OUString& _rString )
aBuffer.append( c );
}
}
- if( aBuffer[ aBuffer.getLength() - 1 ] == u' ' )
+ if( !aBuffer.isEmpty() && aBuffer[ aBuffer.getLength() - 1 ] == u' ' )
aBuffer.setLength( aBuffer.getLength() - 1 );
return aBuffer.makeStringAndClear();
}