]> git.donarmstrong.com Git - lilypond.git/commitdiff
robustness: don't barf if control-points is in-progress.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 5 Feb 2007 18:53:14 +0000 (19:53 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 5 Feb 2007 18:53:14 +0000 (19:53 +0100)
lily/tuplet-number.cc

index aa0c343c589977f251100dd641ff7bb8df380b43..54032803e9d0f216f402ec01404a113de04c2488 100644 (file)
@@ -52,9 +52,15 @@ Tuplet_number::print (SCM smob)
 
   SCM cpoints =  tuplet->get_property ("control-points");
   Drul_array<Offset> points;
-  points[LEFT] = ly_scm2offset (scm_car (cpoints));
-  points[RIGHT] = ly_scm2offset (scm_cadr (cpoints));
-
+  if (scm_is_pair (cpoints))
+    {
+      points[LEFT] = ly_scm2offset (scm_car (cpoints));
+      points[RIGHT] = ly_scm2offset (scm_cadr (cpoints));
+    }
+  else
+    {
+      programming_error ("wrong type for control-points");
+    }
   stc->translate ((points[RIGHT] + points[LEFT]) / 2);
   
   return stc_scm;