projects
/
platform
/
core
/
appfw
/
launchpad.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix static analysis issue
[platform/core/appfw/launchpad.git]
/
src
/
launchpad-parser
/
launchpad_parser_plugin.cc
diff --git
a/src/launchpad-parser/launchpad_parser_plugin.cc
b/src/launchpad-parser/launchpad_parser_plugin.cc
index
8ccee30
..
f873673
100644
(file)
--- a/
src/launchpad-parser/launchpad_parser_plugin.cc
+++ b/
src/launchpad-parser/launchpad_parser_plugin.cc
@@
-142,6
+142,9
@@
int LaunchpadParser::Upgrade(xmlDocPtr doc, std::string pkgid) {
int LaunchpadParser::UnInstall(xmlDocPtr doc, std::string pkgid) {
xmlNode* root = xmlDocGetRootElement(doc);
+ if (root == nullptr)
+ return -1;
+
for (xmlNode* node = root->children; node; node = node->next) {
if (!node->name)
continue;