From 33b2cf13e5ba8699e5bfaad9c743361ec14cf150 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 16 Nov 2014 11:06:32 -0500 Subject: Fix nasty leak (bzr r13719) --- src/sp-ellipse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index b5c6e4af8..027accd39 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -642,8 +642,8 @@ bool SPGenericEllipse::set_elliptical_path_attribute(Inkscape::XML::Node *repr) // Make sure our pathvector is up to date. this->set_shape(); - if (this->getCurve() != NULL) { - gchar* d = sp_svg_write_path(this->getCurve()->get_pathvector()); + if (_curve != NULL) { + gchar* d = sp_svg_write_path(_curve->get_pathvector()); repr->setAttribute("d", d); -- cgit v1.2.3 From 513f464acbc3b4216f8f232ec39eef35de508726 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 16 Nov 2014 12:18:01 -0500 Subject: Don't write the d attribute on or (bzr r13720) --- src/sp-ellipse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 027accd39..a74d4687d 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -604,7 +604,7 @@ void SPGenericEllipse::update_patheffect(bool write) if (write) { Inkscape::XML::Node *repr = this->getRepr(); - if (this->_curve != NULL) { + if (this->_curve != NULL && type == SP_GENERIC_ELLIPSE_ARC) { gchar *str = sp_svg_write_path(this->_curve->get_pathvector()); repr->setAttribute("d", str); g_free(str); -- cgit v1.2.3