index 34855cd4e6e401455a14194d127646cd488f126f..ccf168446d2eaf811ad677a85c87e9934ba384a9 100644 (file)
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
DTD in general for this stuff */
Inkscape::XML::Document *doc = sp_repr_read_file(filename, NULL);
Extension *ext = build_from_reprdoc(doc, NULL);
DTD in general for this stuff */
Inkscape::XML::Document *doc = sp_repr_read_file(filename, NULL);
Extension *ext = build_from_reprdoc(doc, NULL);
- Inkscape::GC::release(doc);
- if (ext == NULL)
+ if (ext != NULL)
+ Inkscape::GC::release(doc);
+ else
g_warning("Unable to create extension from definition file %s.\n", filename);
return ext;
}
g_warning("Unable to create extension from definition file %s.\n", filename);
return ext;
}