[Libreoffice-commits] core.git: l10ntools/source

Michael Stahl mstahl at redhat.com
Wed Apr 16 04:24:39 PDT 2014


 l10ntools/source/helpmerge.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit aef2111fd14d654f72ae910eb52eb8c8f2b8cc94
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Apr 16 13:19:44 2014 +0200

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

diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 6d3c4dd..20773de 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;


More information about the Libreoffice-commits mailing list