summaryrefslogtreecommitdiffstats
path: root/src/extension/extension.cpp
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2014-09-23 06:43:33 +0000
committerJazzyNico <nicoduf@yahoo.fr>2014-09-23 06:43:33 +0000
commit363a3075b59439f9845412e9bb678ac759794753 (patch)
tree9cb2c5b043cfdbf89239afa54a153d9dad509717 /src/extension/extension.cpp
parentimproved version of rev 13561, to allow transforming both clip and mask on th... (diff)
downloadinkscape-363a3075b59439f9845412e9bb678ac759794753.tar.gz
inkscape-363a3075b59439f9845412e9bb678ac759794753.zip
Extensions. Fix for Bug #1372200 (Comment within <script> element in INX file triggers crash on launch).
Fixed bugs: - https://launchpad.net/bugs/1372200 (bzr r13563)
Diffstat (limited to 'src/extension/extension.cpp')
-rw-r--r--src/extension/extension.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp
index 06e35ff3e..6a22eb585 100644
--- a/src/extension/extension.cpp
+++ b/src/extension/extension.cpp
@@ -112,8 +112,13 @@ Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementat
_deps.push_back(new Dependency(child_repr));
} /* dependency */
if (!strcmp(chname, "script")) {
- _deps.push_back(new Dependency(child_repr->firstChild()));
- } /* check command as a dependency (see LP #505920) */
+ for (Inkscape::XML::Node *child = child_repr->firstChild(); child != NULL ; child = child->next()) {
+ if (child->type() == Inkscape::XML::ELEMENT_NODE) {
+ _deps.push_back(new Dependency(child));
+ break;
+ } /* skip non-element nodes (see LP #1372200) */
+ }
+ } /* check command as a dependency (see LP #505920) */
if (!strcmp(chname, "options")) {
silent = !strcmp( child_repr->attribute("silent"), "true" );
}