Kaydet (Commit) 0439f667 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

xmlscript: avoid accessing [0] of an emptry string

Change-Id: I2ad756b07418d3eb93f48374cd7de3bc3db9ce29
üst 00786440
......@@ -1064,7 +1064,11 @@ void TextFieldElement::endElement()
if (getStringAttr( &aValue, "echochar", _xAttributes, _pImport->XMLNS_DIALOGS_UID ) && !aValue.isEmpty() )
{
SAL_WARN_IF( aValue.getLength() != 1, "xmlscript.xmldlg", "### more than one character given for echochar!" );
sal_Int16 nChar = (sal_Int16)aValue[ 0 ];
sal_Int16 nChar = 0;
if(!aValue.isEmpty())
{
nChar = (sal_Int16)aValue[ 0 ];
}
xControlModel->setPropertyValue( "EchoChar", makeAny( nChar ) );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment