]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bezier.cc
patch::: 1.3.99.jcn2
[lilypond.git] / lily / bezier.cc
index faf5b899a2662a5c0aaabc347620d1298a97d2e2..21c49801b54dc19fbadab5c72864dba763b5ddf8 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <math.h>
 #include "config.h"
+#include "warn.hh"
 
 #include "libc-extension.hh"
 #include "bezier.hh"
@@ -65,6 +66,12 @@ Bezier::get_other_coordinate (Axis a,  Real x) const
 {
   Axis other = Axis ((a +1)%NO_AXES);
   Array<Real> ts = solve_point (a, x);
+
+  if (ts.size () == 0)
+    {
+      programming_error ("No solution found for Bezier intersection.");
+      return 0.0;
+    }
   
   Offset c = curve_point (ts[0]);
   assert (fabs (c[a] - x) < 1e-8);