diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-09-02 19:32:59 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-09-02 19:32:59 +0000 |
| commit | fd0a5dfa4cb237f8e5232c785693cc3e676336e8 (patch) | |
| tree | 74bc967114726b2e9b87ba2439cdbfed03549dde /src/sp-object.cpp | |
| parent | performance: ?? (diff) | |
| download | inkscape-fd0a5dfa4cb237f8e5232c785693cc3e676336e8.tar.gz inkscape-fd0a5dfa4cb237f8e5232c785693cc3e676336e8.zip | |
converted some c-string usage to c++ string class usage: should fix some memory leaks
(bzr r11646)
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 892c89a15..9ceeaf262 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -1031,15 +1031,9 @@ Inkscape::XML::Node * SPObject::sp_object_private_write(SPObject *object, Inksca if( prefs->getBool("/options/svgoutput/check_on_editing") ) { unsigned int flags = sp_attribute_clean_get_prefs(); - gchar *s_cleaned = sp_attribute_clean_style( repr, s, flags ); - - // g_warning("SPObject::sp_object_private_write: %s", object->getId() ); - // g_warning(" old: :%s:", repr->attribute("style") ); - // g_warning(" new: :%s:", s ); - // g_warning(" cleaned: :%s:", s_cleaned ); - + Glib::ustring s_cleaned = sp_attribute_clean_style( repr, s, flags ); g_free( s ); - s = s_cleaned; + s = (s_cleaned.empty() ? NULL : g_strdup (s_cleaned.c_str())); } if( s == NULL || strcmp(s,"") == 0 ) { |
