diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/launchpad-parser/launchpad_parser_plugin.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/launchpad-parser/launchpad_parser_plugin.cc b/src/launchpad-parser/launchpad_parser_plugin.cc index eacfbf2..575afd6 100644 --- a/src/launchpad-parser/launchpad_parser_plugin.cc +++ b/src/launchpad-parser/launchpad_parser_plugin.cc @@ -94,6 +94,9 @@ int LaunchpadParser::Install(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; |