summaryrefslogtreecommitdiffstats
path: root/src/path-chemistry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/path-chemistry.cpp')
-rw-r--r--src/path-chemistry.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 7466a7066..c71784b57 100644
--- 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 */