diff options
author | Eduardo Mendi <eduardox.mendi@intel.com> | 2014-04-15 17:29:52 +0200 |
---|---|---|
committer | Mattijs Korpershoek <mattijsx.korpershoek@intel.com> | 2014-06-25 10:52:22 +0200 |
commit | 30095b3c0b84e85caf253a27e41254eaf35e4ca7 (patch) | |
tree | 0575594ba2fa09db75a1eabcf17f2c85971deed9 /xmlserializer | |
parent | cce85f6b6691e4b1ddb81171e3ca5b5aeb71e6b9 (diff) | |
download | external_parameter-framework-30095b3c0b84e85caf253a27e41254eaf35e4ca7.zip external_parameter-framework-30095b3c0b84e85caf253a27e41254eaf35e4ca7.tar.gz external_parameter-framework-30095b3c0b84e85caf253a27e41254eaf35e4ca7.tar.bz2 |
Fix KW10 issues
BZ: 186081
Due to upgrade klocwork (KW version from 9.6 to 10.0)
new issues have been raised.
This patch fix the new issues raised in PFW.
Change-Id: I54c14e4d6da1c9a5f8d82aec1769a9e7e948db50
Signed-off-by: Eduardo Mendi <eduardox.mendi@intel.com>
Diffstat (limited to 'xmlserializer')
-rw-r--r-- | xmlserializer/XmlElement.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmlserializer/XmlElement.cpp b/xmlserializer/XmlElement.cpp index d0ab91a..bda3973 100644 --- a/xmlserializer/XmlElement.cpp +++ b/xmlserializer/XmlElement.cpp @@ -86,6 +86,9 @@ string CXmlElement::getAttributeString(const string &strAttributeName) const return ""; } xmlChar* pucXmlValue = xmlGetProp((xmlNode*)_pXmlElement, (const xmlChar*)strAttributeName.c_str()); + if (pucXmlValue == NULL) { + return ""; + } string strValue((const char*)pucXmlValue); @@ -130,6 +133,9 @@ double CXmlElement::getAttributeDouble(const string &strAttributeName) const string CXmlElement::getTextContent() const { xmlChar* pucXmlContent = xmlNodeGetContent(_pXmlElement); + if (pucXmlContent == NULL) { + return ""; + } string strContent((const char*)pucXmlContent); |