Code

no longer GC::release(NULL) with defect inx files, fixes #1358999
authorrwst <rwst@users.sourceforge.net>
Mon, 13 Feb 2006 16:40:03 +0000 (16:40 +0000)
committerrwst <rwst@users.sourceforge.net>
Mon, 13 Feb 2006 16:40:03 +0000 (16:40 +0000)
src/extension/system.cpp

index 34855cd4e6e401455a14194d127646cd488f126f..ccf168446d2eaf811ad677a85c87e9934ba384a9 100644 (file)
@@ -437,8 +437,9 @@ build_from_file(gchar const *filename)
        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;
 }