Code

Patch by Johan to fix crashing by undefined path parameters in 4 LPEs
[inkscape.git] / src / live_effects / lpe-interpolate.cpp
index e19d2e6e744701bacce89e7116d6610101b7b1b1..e77a392e9f4fe8f377fbe6a887c7b35b2a7fa9cf 100644 (file)
@@ -52,8 +52,13 @@ LPEInterpolate::~LPEInterpolate()
 Geom::PathVector
 LPEInterpolate::doEffect_path (Geom::PathVector const & path_in)
 {
-    if ( (path_in.size() < 2) || (number_of_steps < 2))
+    if ( (path_in.size() < 2) || (number_of_steps < 2)) {
         return path_in;
+    }
+    // Don't allow empty path parameter:
+    if ( trajectory_path.get_pathvector().empty() ) {
+        return path_in;
+    }
 
     std::vector<Geom::Path> path_out;