From: joelholdsworth Date: Wed, 5 Mar 2008 17:17:10 +0000 (+0000) Subject: Bugfix for bug #168283: possible to create empty paths via text -> object to path... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5e4318dcf1a5abd6d513e0321c78939d20e6a7f4;p=inkscape.git Bugfix for bug #168283: possible to create empty paths via text -> object to path. Text that produces no glyphs is left unconverted. --- 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 */