From 487f0940377b4fbf9ebae8ab2a53f2f992e60deb Mon Sep 17 00:00:00 2001 From: Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> Date: Thu, 10 Oct 2019 22:05:48 +1100 Subject: Reduce memory leak on editing text, etc. --- src/ui/toolbar/text-toolbar.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ui/toolbar/text-toolbar.cpp') diff --git a/src/ui/toolbar/text-toolbar.cpp b/src/ui/toolbar/text-toolbar.cpp index 2488d8ec7..f2cf73257 100644 --- a/src/ui/toolbar/text-toolbar.cpp +++ b/src/ui/toolbar/text-toolbar.cpp @@ -212,7 +212,9 @@ namespace Toolbar { TextToolbar::TextToolbar(SPDesktop *desktop) : Toolbar(desktop) , _freeze(false) + , _text_style_from_prefs(false) , _outer(true) + , _updating(false) , _tracker(new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR)) , _tracker_fs(new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR)) , _cusor_numbers(0) @@ -657,7 +659,9 @@ TextToolbar::fontfamily_value_changed() } _freeze = true; - Glib::ustring new_family = _font_family_item->get_active_text(); + gchar *temp_family = _font_family_item->get_active_text(); + Glib::ustring new_family(temp_family); + g_free(temp_family); css_font_family_unquote( new_family ); // Remove quotes around font family names. // TODO: Think about how to handle handle multiple selections. While -- cgit v1.2.3