diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 50bf0b1598f2..9da1a0e729d9 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -565,7 +565,7 @@ void ODBExport::exportConnectionData() { ::svt::OFileNotation aTransformer( sFileName ); ::rtl::OUStringBuffer sURL( aTransformer.get( ::svt::OFileNotation::N_URL ) ); - if (sURL[sURL.getLength() - 1] != '/') + if (sURL.getLength() == 0 || sURL[sURL.getLength() - 1] != '/') sURL.append('/'); AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,GetRelativeReference(sURL.makeStringAndClear()));