summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-04-16 13:19:44 +0200
committerMichael Stahl <mstahl@redhat.com>2014-04-16 13:20:25 +0200
commitaef2111fd14d654f72ae910eb52eb8c8f2b8cc94 (patch)
tree0bb01a2414c8c938bc5b420c44070824e0465480 /l10ntools
parentb827f6f81f6a8f6d8046a278a18acb69e780afba (diff)
l10ntools: helpex: don't crash if the file can't be parsed; return error
Change-Id: I637f8486b0774b399ed5e250868d756c944e50f6
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/helpmerge.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 6d3c4ddb73b5..20773de553ac 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -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;