diff options
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index af40e4d51d65..3aed2223ef43 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -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 ) ); } |