summaryrefslogtreecommitdiffstats
path: root/src/extension/system.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-10-06 00:18:46 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-10-06 00:18:46 +0000
commit7d38f876e8a4c5ab60261f61452fa2bf8baf13f3 (patch)
tree8d93f93ef7634ca78637b55edb9de4401669b2bb /src/extension/system.cpp
parentAdd missing file to CMakeLists (diff)
parentRemove unused functions. (diff)
downloadinkscape-7d38f876e8a4c5ab60261f61452fa2bf8baf13f3.tar.gz
inkscape-7d38f876e8a4c5ab60261f61452fa2bf8baf13f3.zip
Update to trunk r13580
(bzr r13341.1.255)
Diffstat (limited to 'src/extension/system.cpp')
-rw-r--r--src/extension/system.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp
index d02d801dc..5225f11ee 100644
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
@@ -556,7 +556,7 @@ build_from_file(gchar const *filename)
}
/**
- * \return The module created
+ * \return The module created, or NULL if buffer is invalid
* \brief This function creates a module from a buffer holding an
* XML description.
* \param buffer The buffer holding the XML description of the module.
@@ -568,6 +568,7 @@ Extension *
build_from_mem(gchar const *buffer, Implementation::Implementation *in_imp)
{
Inkscape::XML::Document *doc = sp_repr_read_mem(buffer, strlen(buffer), INKSCAPE_EXTENSION_URI);
+ g_return_val_if_fail(doc != NULL, NULL);
Extension *ext = build_from_reprdoc(doc, in_imp);
Inkscape::GC::release(doc);
return ext;