From 93124d10d65528cd8db7c81b1609c6533d4912cd Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 14 Sep 2007 21:41:07 +0000 Subject: fix pasting of LPE's across multiple document; plus a number of small fixes. (bzr r3745) --- src/sp-shape.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/sp-shape.cpp') diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index ff0ebf887..511081b4c 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -1130,7 +1130,11 @@ LivePathEffectObject * sp_shape_get_livepatheffectobject(SPShape *shape) { if (!shape) return NULL; - return shape->path_effect_ref->lpeobject; + if (sp_shape_has_path_effect(shape)) { + return shape->path_effect_ref->lpeobject; + } else { + return NULL; + } } /** @@ -1205,6 +1209,10 @@ void sp_shape_remove_path_effect(SPShape *shape) } } +bool sp_shape_has_path_effect(SPShape *shape) +{ + return (shape->path_effect_href != NULL); +} /* Local Variables: -- cgit v1.2.3