summaryrefslogtreecommitdiffstats
path: root/src/extension/system.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-10-08 02:22:03 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-10-08 02:22:03 +0000
commitf3840fe9d0d423f6ddf5a68d776a903d57ffb7b5 (patch)
treec8e28b27f5885928ccf866a69eb6cbc99fde599c /src/extension/system.cpp
parentUpdate to experimental r13565 (diff)
parentSome template cleanup... (diff)
downloadinkscape-f3840fe9d0d423f6ddf5a68d776a903d57ffb7b5.tar.gz
inkscape-f3840fe9d0d423f6ddf5a68d776a903d57ffb7b5.zip
Update to experimental r13598
(bzr r13341.5.17)
Diffstat (limited to 'src/extension/system.cpp')
-rw-r--r--src/extension/system.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp
index 651964912..6a95717f2 100644
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
@@ -20,7 +20,7 @@
# include <config.h>
#endif
-#include <interface.h>
+#include "ui/interface.h"
#include <unistd.h>
#include <glibmm/miscutils.h>
@@ -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;