diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-12-26 18:49:12 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-12-26 18:49:12 +0000 |
| commit | 74f6d0cf39c974ca1980a7be7742f2154d2025f2 (patch) | |
| tree | f98b503be33ccc32c1074c5c670a0cd9b5fb5332 /src/selection-chemistry.cpp | |
| parent | Documentation. Fix for bug #1405653 (Outdated links in hacking doc). (diff) | |
| parent | SPStyle ref counting clean up. (diff) | |
| download | inkscape-74f6d0cf39c974ca1980a7be7742f2154d2025f2.tar.gz inkscape-74f6d0cf39c974ca1980a7be7742f2154d2025f2.zip | |
Replace sp_style_xxx functions with SPStyle member functions.
Fix a bunch of memory leaks. One leak still remaining in Layout::appendText.
(bzr r13824)
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rw-r--r-- | src/selection-chemistry.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 98ebd1f61..c9837aabe 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2110,7 +2110,7 @@ GSList *sp_get_same_stroke_style(SPItem *sel, GSList *src, SPSelectStrokeStyleTy SPStyle *sel_style_for_width = NULL; if (type == SP_STROKE_STYLE_WIDTH) { objects = g_slist_prepend(objects, sel); - sel_style_for_width = sp_style_new (SP_ACTIVE_DOCUMENT); + sel_style_for_width = new SPStyle(SP_ACTIVE_DOCUMENT); objects_query_strokewidth (objects, sel_style_for_width); } @@ -2125,11 +2125,11 @@ GSList *sp_get_same_stroke_style(SPItem *sel, GSList *src, SPSelectStrokeStyleTy if (sel_style->stroke_width.set && iter_style->stroke_width.set) { GSList *objects = NULL; objects = g_slist_prepend(objects, iter); - SPStyle *iter_style_for_width = sp_style_new (SP_ACTIVE_DOCUMENT); - objects_query_strokewidth (objects, iter_style_for_width); + SPStyle tmp_style(SP_ACTIVE_DOCUMENT); + objects_query_strokewidth (objects, &tmp_style); if (sel_style_for_width) { - match = (sel_style_for_width->stroke_width.computed == iter_style_for_width->stroke_width.computed); + match = (sel_style_for_width->stroke_width.computed == tmp_style.stroke_width.computed); } g_slist_free(objects); } @@ -2161,6 +2161,7 @@ GSList *sp_get_same_stroke_style(SPItem *sel, GSList *src, SPSelectStrokeStyleTy } } + if( sel_style_for_width != NULL ) delete sel_style_for_width; g_slist_free(objects); return matches; |
