summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f2168b8)
raw | patch | inline | side by side (parent: f2168b8)
| author | joelholdsworth <joelholdsworth@users.sourceforge.net> | |
| Wed, 5 Mar 2008 17:17:10 +0000 (17:17 +0000) | ||
| committer | joelholdsworth <joelholdsworth@users.sourceforge.net> | |
| Wed, 5 Mar 2008 17:17:10 +0000 (17:17 +0000) |
| src/path-chemistry.cpp | patch | blob | history |
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 7466a706626b7e7df57141cfc6f7a0658d2a1ecb..c71784b57eec2807ff28c51c5edba7716e2e2dd0 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -372,6 +372,14 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/)
if (!curve)
return NULL;
+ // Prevent empty paths from being added to the document
+ // otherwise we end up with zomby markup in the SVG file
+ if(curve->end <= 0)
+ {
+ sp_curve_unref(curve);
+ return NULL;
+ }
+
Inkscape::XML::Document *xml_doc = SP_OBJECT_REPR(item)->document();
Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
/* Transformation */