summaryrefslogtreecommitdiffstats
path: root/src/display/nr-style.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-10-03 18:57:47 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-10-03 18:57:47 +0000
commit48cc8d24e8130d6cec0468692cbd3cfb90e6c66e (patch)
treebb68c2c6ea34168e4b066037c3600e0add80cd7e /src/display/nr-style.cpp
parentfix for cmake linking, currently include some hard coded paths since their ar... (diff)
downloadinkscape-48cc8d24e8130d6cec0468692cbd3cfb90e6c66e.tar.gz
inkscape-48cc8d24e8130d6cec0468692cbd3cfb90e6c66e.zip
fixing memory release issue (valgrind reported; bug #1043571 , comment 16 issue 2)
(bzr r11731)
Diffstat (limited to 'src/display/nr-style.cpp')
-rw-r--r--src/display/nr-style.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/display/nr-style.cpp b/src/display/nr-style.cpp
index 86102f9e8..ba2340074 100644
--- a/src/display/nr-style.cpp
+++ b/src/display/nr-style.cpp
@@ -60,7 +60,9 @@ NRStyle::~NRStyle()
{
if (fill_pattern) cairo_pattern_destroy(fill_pattern);
if (stroke_pattern) cairo_pattern_destroy(stroke_pattern);
- if (dash) delete dash;
+ if (dash){
+ delete [] dash;
+ }
}
void NRStyle::set(SPStyle *style)
@@ -126,7 +128,9 @@ void NRStyle::set(SPStyle *style)
}
miter_limit = style->stroke_miterlimit.value;
- if (dash) delete [] dash;
+ if (dash){
+ delete [] dash;
+ }
n_dash = style->stroke_dash.n_dash;
if (n_dash != 0) {