summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-09-28 19:58:24 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-09-28 19:58:24 +0000
commit0b3a91c8ff18bd30b42beb71244ff9b0542ed2ca (patch)
treeb8f264e1d0a42adecb93b8ff0cc1a712d6820cb0
parenteffects don't need to merge into menus if we're running without gui; with thi... (diff)
downloadinkscape-0b3a91c8ff18bd30b42beb71244ff9b0542ed2ca.tar.gz
inkscape-0b3a91c8ff18bd30b42beb71244ff9b0542ed2ca.zip
fix two memleaks
(bzr r12617)
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index ab5f4c0e9..56ecfdecc 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -541,7 +541,9 @@ void SvgFontsDialog::set_glyph_description_from_selected_path(){
Geom::PathVector pathv = sp_svg_read_pathv(node->attribute("d"));
//XML Tree being directly used here while it shouldn't be.
- glyph->getRepr()->setAttribute("d", (char*) sp_svg_write_path (flip_coordinate_system(pathv)));
+ gchar *str = sp_svg_write_path (flip_coordinate_system(pathv));
+ glyph->getRepr()->setAttribute("d", str);
+ g_free(str);
DocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph curves"));
update_glyphs();
@@ -578,7 +580,9 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){
if (SP_IS_MISSING_GLYPH(obj)){
//XML Tree being directly used here while it shouldn't be.
- obj->getRepr()->setAttribute("d", (char*) sp_svg_write_path (flip_coordinate_system(pathv)));
+ gchar *str = sp_svg_write_path (flip_coordinate_system(pathv));
+ obj->getRepr()->setAttribute("d", str);
+ g_free(str);
DocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph curves"));
}
}