summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-fillet-chamfer.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-11-04 16:11:37 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-11-05 21:09:14 +0000
commitb8db3fe79b8509d18a4660c553848c740ca046bb (patch)
treeef2c696946477ab2875a3286ce9195e9e56e5da3 /src/live_effects/lpe-fillet-chamfer.cpp
parentRemove unused header. (diff)
downloadinkscape-b8db3fe79b8509d18a4660c553848c740ca046bb.tar.gz
inkscape-b8db3fe79b8509d18a4660c553848c740ca046bb.zip
Fixing bad destruction of Fillet Chamfer LPE items
Diffstat (limited to 'src/live_effects/lpe-fillet-chamfer.cpp')
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index 8e07388f5..ad489042b 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -83,13 +83,7 @@ LPEFilletChamfer::LPEFilletChamfer(LivePathEffectObject *lpeobject)
chamfer_steps.param_set_increments(1, 1);
chamfer_steps.param_set_digits(0);
_provides_knotholder_entities = true;
- previous_unit = NULL;
-}
-
-LPEFilletChamfer::~LPEFilletChamfer() {
- if(previous_unit) {
- g_free(previous_unit);
- }
+ previous_unit = Glib::ustring("");
}
void LPEFilletChamfer::doOnApply(SPLPEItem const *lpeItem)
@@ -379,11 +373,11 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem)
_pathvector_satellites->setSatellites(satellites);
satellites_param.setPathVectorSatellites(_pathvector_satellites, write);
refreshKnots();
- gchar const *current_unit = unit.get_abbreviation();
- if (previous_unit && strcmp(previous_unit, current_unit) ) {
+ Glib::ustring current_unit = Glib::ustring(unit.get_abbreviation());
+ if (previous_unit != current_unit) {
updateAmount();
}
- previous_unit = const_cast<gchar *>(current_unit);
+ previous_unit = current_unit;
} else {
g_warning("LPE Fillet can only be applied to shapes (not groups).");
}