diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2013-08-03 19:40:28 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2013-08-03 19:40:28 +0000 |
| commit | 6e0c3f93c7ea02b0c072ee9c8b56a3a4e5fcfe31 (patch) | |
| tree | 69ae782279f0a658acc0f788de66ade7c6d18ef5 | |
| parent | add comment. cppcheck false positive (diff) | |
| download | inkscape-6e0c3f93c7ea02b0c072ee9c8b56a3a4e5fcfe31.tar.gz inkscape-6e0c3f93c7ea02b0c072ee9c8b56a3a4e5fcfe31.zip | |
disable really bad memset on a huge struct that contains member objects besides just integers and enums
(bzr r12452)
| -rw-r--r-- | src/style.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/style.cpp b/src/style.cpp index 479f30597..a9861f918 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -2945,14 +2945,19 @@ sp_style_clear(SPStyle *style) style->stroke.clear(); sp_style_filter_clear(style); + style->release_connection.disconnect(); + + style->fill_ps_modified_connection.disconnect(); if (style->fill.value.href) { delete style->fill.value.href; style->fill.value.href = NULL; } + style->stroke_ps_modified_connection.disconnect(); if (style->stroke.value.href) { delete style->stroke.value.href; style->stroke.value.href = NULL; } + style->filter_modified_connection.disconnect(); if (style->filter.href) { delete style->filter.href; style->filter.href = NULL; @@ -2972,8 +2977,9 @@ sp_style_clear(SPStyle *style) SPTextStyle *text = style->text; unsigned const text_private = style->text_private; - memset(style, 0, sizeof(SPStyle)); - + // this looks really bad! you can't just 0 *all* data in the whole struct! + // memset(style, 0, sizeof(SPStyle)); + style->refcount = refcount; style->object = object; style->document = document; |
