summaryrefslogtreecommitdiffstats
path: root/src/sp-item.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-06-12 18:11:49 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-06-12 18:11:49 +0000
commit38bdfb3415eea66874f3846a99ca315663f9ee87 (patch)
treec558cb3038c684f8691c3ee21144369636292cc9 /src/sp-item.cpp
parentprevent crashing by not running prefs dialog when in command line mode (diff)
downloadinkscape-38bdfb3415eea66874f3846a99ca315663f9ee87.tar.gz
inkscape-38bdfb3415eea66874f3846a99ca315663f9ee87.zip
fix crash when ungrouping lpe paths
(bzr r5908)
Diffstat (limited to 'src/sp-item.cpp')
-rw-r--r--src/sp-item.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 0784d404c..8fa934278 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -1299,14 +1299,16 @@ sp_item_adjust_livepatheffect (SPItem *item, NR::Matrix const &postmul, bool set
// If the path effect is used by 2 or more items, fork it
// so that each object has its own independent copy of the effect
LivePathEffectObject *lpeobj = (*it)->lpeobject;
- LivePathEffectObject *new_lpeobj = lpeobj->fork_private_if_necessary();
- if (new_lpeobj != lpeobj) {
- sp_lpe_item_replace_path_effect(lpeitem, lpeobj, new_lpeobj);
- }
+ if (lpeobj) {
+ LivePathEffectObject *new_lpeobj = lpeobj->fork_private_if_necessary();
+ if (new_lpeobj != lpeobj) {
+ sp_lpe_item_replace_path_effect(lpeitem, lpeobj, new_lpeobj);
+ }
- if (lpeobj->lpe) {
- Inkscape::LivePathEffect::Effect * effect = lpeobj->lpe;
- effect->transform_multiply(to_2geom(postmul), set);
+ if (lpeobj->lpe) {
+ Inkscape::LivePathEffect::Effect * effect = lpeobj->lpe;
+ effect->transform_multiply(to_2geom(postmul), set);
+ }
}
}
}