From 6e0c3f93c7ea02b0c072ee9c8b56a3a4e5fcfe31 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 3 Aug 2013 21:40:28 +0200 Subject: disable really bad memset on a huge struct that contains member objects besides just integers and enums (bzr r12452) --- src/style.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/style.cpp') 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; -- cgit v1.2.3