summaryrefslogtreecommitdiffstats
path: root/src/preferences.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-10-28 10:33:14 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-10-28 10:33:14 +0000
commitfa9ae5fb7c249a4c96a06bfef905c73cbb17bc3d (patch)
tree8c06d1d61a79a74381cb75a925ef50dd598da8c2 /src/preferences.cpp
parentTrying libFuzzer (diff)
parentFix XML text parsing bug. (diff)
downloadinkscape-fa9ae5fb7c249a4c96a06bfef905c73cbb17bc3d.tar.gz
inkscape-fa9ae5fb7c249a4c96a06bfef905c73cbb17bc3d.zip
Merge branch 'master' of https://gitlab.com/inkscape/inkscape
Diffstat (limited to 'src/preferences.cpp')
-rw-r--r--src/preferences.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/preferences.cpp b/src/preferences.cpp
index 7ebf55a79..b02e71e46 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -393,6 +393,9 @@ std::vector<Glib::ustring> Preferences::getAllDirs(Glib::ustring const &path)
Inkscape::XML::Node *node = _getNode(path, false);
if (node) {
for (Inkscape::XML::NodeSiblingIterator i = node->firstChild(); i; ++i) {
+ if (i->attribute("id") == NULL) {
+ continue;
+ }
temp.push_back(path + '/' + i->attribute("id"));
}
}
@@ -702,6 +705,9 @@ Inkscape::XML::Node *Preferences::_getNode(Glib::ustring const &pref_key, bool c
}
for (child = node->firstChild(); child; child = child->next()) {
+ if (child->attribute("id") == NULL) {
+ continue;
+ }
if (!strcmp(splits[part_i], child->attribute("id"))) {
break;
}