diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-10-27 23:38:54 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-10-27 23:38:54 +0000 |
| commit | a8663be9f9ba3e0b3f3d777b024fa60405ba6464 (patch) | |
| tree | f2fea260b6e3ca36ba42743f7a47a84530281a57 /src/preferences.cpp | |
| parent | Fix simbols dialog expand, Fix add symbols to document on global search (diff) | |
| parent | Protect against missing "id". (diff) | |
| download | inkscape-a8663be9f9ba3e0b3f3d777b024fa60405ba6464.tar.gz inkscape-a8663be9f9ba3e0b3f3d777b024fa60405ba6464.zip | |
Merge branch 'master' into SymbolsSearch
Diffstat (limited to 'src/preferences.cpp')
| -rw-r--r-- | src/preferences.cpp | 6 |
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; } |
