l10ntools: helpex: don't crash if the file can't be parsed; return error

Change-Id: I637f8486b0774b399ed5e250868d756c944e50f6
This commit is contained in:
Michael Stahl 2014-04-16 13:19:44 +02:00
parent b827f6f81f
commit aef2111fd1

View File

@ -152,6 +152,11 @@ bool HelpParser::Merge( const OString &rPOFile, const OString &rDestinationFile,
//TODO: explicit BOM handling?
XMLFile* xmlfile = ( aParser.Execute( sHelpFile, new XMLFile( OString('0') ) ) );
if (!xmlfile)
{
SAL_WARN("l10ntools", "could not parse " << sHelpFile);
return false;
}
bool hasNoError = MergeSingleFile( xmlfile , pMergeDataFile , rLanguage , rDestinationFile );
delete xmlfile;
return hasNoError;