diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-07-22 00:08:40 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-22 03:17:30 +0000 |
commit | b11dc22caa903014c295bea62a6d86e5e12518d8 (patch) | |
tree | acc82f300fd429cef1870803e27b3b05ab569517 /l10ntools | |
parent | Math: Fix memory leak with SmDocShell (diff) | |
download | core-b11dc22caa903014c295bea62a6d86e5e12518d8.tar.gz core-b11dc22caa903014c295bea62a6d86e5e12518d8.zip |
coverity#1038312: Dereference before null check
Change-Id: Ibe9babbe8610bf70a80b819e21d24c6572436092
Reviewed-on: https://gerrit.libreoffice.org/5015
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/helpmerge.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index d79dfaea7fa2..161362e1feab 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -263,11 +263,12 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa aLangHM->erase( sCur ); } } - else if( pResData == NULL ) + else if( pResData ) { - fprintf(stdout,"Can't find GID=%s LID=%s TYP=%s\n", - pResData->sGId.getStr(), pResData->sId.getStr(), - pResData->sResTyp.getStr()); + SAL_WARN( + "l10ntools", + "Can't find GID=" << pResData->sGId.getStr() << " LID=" + << pResData->sId.getStr() << " TYP=" << pResData->sResTyp.getStr() << "\n"); } pXMLElement->ChangeLanguageTag( OStringToOUString(sCur, RTL_TEXTENCODING_ASCII_US)); |