Code

temporary fix for crash with shapes and path-along-path LPE
authorjohanengelen <johanengelen@users.sourceforge.net>
Tue, 30 Oct 2007 23:40:31 +0000 (23:40 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Tue, 30 Oct 2007 23:40:31 +0000 (23:40 +0000)
src/live_effects/lpe-pathalongpath.cpp

index 0e9be8f1626fe58f518bc8d2c4fcb622b3e270ee..cd9c433f7d9cd87b6f386b994888f774936a13b2 100644 (file)
@@ -9,6 +9,7 @@
 #include "live_effects/lpe-pathalongpath.h"\r
 #include "sp-shape.h"\r
 #include "sp-item.h"\r
+#include "sp-path.h"\r
 #include "display/curve.h"\r
 #include <libnr/n-art-bpath.h>\r
 #include <libnr/nr-matrix-fns.h>\r
@@ -159,6 +160,8 @@ LPEPathAlongPath::doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
 void\r
 LPEPathAlongPath::resetDefaults(SPItem * item)\r
 {\r
+    if (!SP_IS_PATH(item)) return;\r
+\r
     using namespace Geom;\r
 \r
     // set the bend path to run horizontally in the middle of the bounding box of the original path\r