diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index ff0ebf887f289846283e991ddd77b1dc49abadef..511081b4c2062b4e85e80167debe3437f73972ab 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
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;
+ }
}
/**
}
}
+bool sp_shape_has_path_effect(SPShape *shape)
+{
+ return (shape->path_effect_href != NULL);
+}
/*
Local Variables: