Deleting all the verticies from a Curve Gradient used to cause a crash. This stops...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 23 Mar 2007 15:46:54 +0000 (15:46 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 23 Mar 2007 15:46:54 +0000 (15:46 +0000)
git-svn-id: http://svn.voria.com/code@372 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp

index 8013b7d..b98caa6 100644 (file)
@@ -77,6 +77,8 @@ inline float calculate_distance(const std::vector<synfig::BLinePoint>& bline)
 
        float dist(0);
 
+       if (bline.empty()) return dist;
+
        next=bline.begin();
 
        //if(loop)