summaryrefslogtreecommitdiffstats
path: root/src/sp-shape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-shape.cpp')
-rw-r--r--src/sp-shape.cpp10
1 files changed, 9 insertions, 1 deletions
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: