summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-11 08:09:28 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-11 08:09:28 +0000
commit5639c270b1b4c509ada273d79dda1d0a60fea1ed (patch)
tree72ca71866afe37891cc0de2f189cb2d2bf4a004d /src
parentFinal cleanup to point parameter, lattice2 and perspective envelope. Also add... (diff)
downloadinkscape-5639c270b1b4c509ada273d79dda1d0a60fea1ed.tar.gz
inkscape-5639c270b1b4c509ada273d79dda1d0a60fea1ed.zip
Inicialite variables to prevent crashes
(bzr r13990)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/effect.cpp4
-rw-r--r--src/live_effects/lpe-lattice2.cpp6
-rw-r--r--src/live_effects/lpe-perspective-envelope.cpp4
-rw-r--r--src/live_effects/parameter/point.cpp2
4 files changed, 10 insertions, 6 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index aab64fe64..bddbd315a 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -363,6 +363,10 @@ Effect::Effect(LivePathEffectObject *lpeobject)
show_orig_path(false),
lpeobj(lpeobject),
concatenate_before_pwd2(false),
+ sp_lpe_item(NULL),
+ defaultUnit("px"),
+ current_zoom(1),
+ sp_curve(NULL),
provides_own_flash_paths(true), // is automatically set to false if providesOwnFlashPaths() is not overridden
is_ready(false) // is automatically set to false if providesOwnFlashPaths() is not overridden
{
diff --git a/src/live_effects/lpe-lattice2.cpp b/src/live_effects/lpe-lattice2.cpp
index cc8c92c4e..f0a7aee68 100644
--- a/src/live_effects/lpe-lattice2.cpp
+++ b/src/live_effects/lpe-lattice2.cpp
@@ -454,9 +454,9 @@ LPELattice2::resetGrid()
grid_point28x30.param_set_and_write_default();
grid_point29x31.param_set_and_write_default();
grid_point32x33x34x35.param_set_and_write_default();
- //todo:this hack is only to reposition the knots on reser grid button
- //Better update path effect in LPEITEM
- sp_lpe_item_update_patheffect(sp_lpe_item, false, false);
+ if(sp_lpe_item){
+ sp_lpe_item_update_patheffect(sp_lpe_item, false, false);
+ }
}
void
diff --git a/src/live_effects/lpe-perspective-envelope.cpp b/src/live_effects/lpe-perspective-envelope.cpp
index 77d487c2a..e4e75cf4d 100644
--- a/src/live_effects/lpe-perspective-envelope.cpp
+++ b/src/live_effects/lpe-perspective-envelope.cpp
@@ -334,7 +334,9 @@ LPEPerspectiveEnvelope::resetGrid()
Up_Right_Point.param_set_and_write_default();
Down_Right_Point.param_set_and_write_default();
Down_Left_Point.param_set_and_write_default();
- sp_lpe_item_update_patheffect(sp_lpe_item, false, false);
+ if(sp_lpe_item){
+ sp_lpe_item_update_patheffect(sp_lpe_item, false, false);
+ }
}
void
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index 8cb9a58a8..319d441b8 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -15,8 +15,6 @@
#include "verbs.h"
#include "knotholder.h"
#include <glibmm/i18n.h>
-#include "ui/tools-switch.h"
-#include "ui/tools/node-tool.h"
// needed for on-canvas editting:
#include "desktop.h"