l10ntools: helpex: don't crash if the file can't be parsed; return error
Change-Id: I637f8486b0774b399ed5e250868d756c944e50f6
This commit is contained in:
@@ -152,6 +152,11 @@ bool HelpParser::Merge( const OString &rPOFile, const OString &rDestinationFile,
|
|||||||
//TODO: explicit BOM handling?
|
//TODO: explicit BOM handling?
|
||||||
|
|
||||||
XMLFile* xmlfile = ( aParser.Execute( sHelpFile, new XMLFile( OString('0') ) ) );
|
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 );
|
bool hasNoError = MergeSingleFile( xmlfile , pMergeDataFile , rLanguage , rDestinationFile );
|
||||||
delete xmlfile;
|
delete xmlfile;
|
||||||
return hasNoError;
|
return hasNoError;
|
||||||
|
Reference in New Issue
Block a user