diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2014-09-15 16:06:04 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2014-09-15 16:06:04 +0000 |
| commit | c9756b3d790bffe1fbdade3ff7e53548fec636e5 (patch) | |
| tree | f219b32ea7f628bc8cd2325bd91a8c18c09d7beb /src | |
| parent | simplify test (note to self: always consult the man page before pushing a com... (diff) | |
| parent | Always check result of sp_repr_read_mem for NULL (diff) | |
| download | inkscape-c9756b3d790bffe1fbdade3ff7e53548fec636e5.tar.gz inkscape-c9756b3d790bffe1fbdade3ff7e53548fec636e5.zip | |
update to trunk (r13556)
(bzr r13506.1.97)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/prefdialog.cpp | 4 | ||||
| -rw-r--r-- | src/extension/system.cpp | 3 | ||||
| -rw-r--r-- | src/inkscape.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index d1f83701f..3a384257c 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -90,6 +90,10 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co if (_effect != NULL && !_effect->no_live_preview) { if (_param_preview == NULL) { XML::Document * doc = sp_repr_read_mem(live_param_xml, strlen(live_param_xml), NULL); + if (doc == NULL) { + std::cout << "Error encountered loading live parameter XML !!!" << std::endl; + return; + } _param_preview = Parameter::make(doc->root(), _effect); } diff --git a/src/extension/system.cpp b/src/extension/system.cpp index c244d9c16..45feb882f 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; diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 4b4c8c678..e312e15b9 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -945,7 +945,7 @@ bool inkscape_load_menus( Inkscape::Application * inkscape ) inkscape->menus = sp_repr_read_mem(menus_skeleton, MENUS_SKELETON_SIZE, NULL); } - return (inkscape->menus != 0); + return (inkscape->menus != NULL); } diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index e04748759..7d43adc0f 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -19,6 +19,7 @@ #include "inkscape-preferences.h" #include <glibmm/i18n.h> +#include <glibmm/markup.h> #include <glibmm/miscutils.h> #include <gtkmm/main.h> #include <gtkmm/frame.h> |
