]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.83
authorfred <fred>
Tue, 26 Mar 2002 23:55:12 +0000 (23:55 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:55:12 +0000 (23:55 +0000)
lily/bezier.cc
lily/music-sequence.cc
lily/music-wrapper.cc
lily/part-combine-music.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);
index 32c386c323df7e3fcdcb41091ac8a6093f44564c..3ff7f4a235d20fe6879a1f59b7f774997fc8d813 100644 (file)
@@ -48,7 +48,9 @@ Music_sequence::append_music (Music *m)
 {
   set_mus_property ("list",
                    gh_append2( music_list(), gh_cons (m->self_scm (), SCM_EOL)));
+  scm_unprotect_object (m->self_scm ());
 }
+
 Music_sequence::Music_sequence(SCM h)
 {
   set_mus_property ("list", h);
index 641c83b91ba32d5256186f79230a6d95deeaa95a..8a2d66f5bd4f459328e7552cf47796e74e154ac7 100644 (file)
@@ -28,6 +28,7 @@ Music_wrapper::transpose (Musical_pitch p)
 Music_wrapper::Music_wrapper(Music*p)
 {
   set_mus_property ("element", p->self_scm ());
+  scm_unprotect_object (p->self_scm ());
 }
 
 Moment
index 27064244b7628996c83685b30524affc92cf8581..d9e98329b3be75126a6068f0c7d1a424eaf255bb 100644 (file)
@@ -15,8 +15,10 @@ Part_combine_music::Part_combine_music (String what, Music * f, Music * s)
   what_str_ = what;
   set_mus_property ("one", f->self_scm ());
   set_mus_property ("two", s->self_scm ());  
-}
 
+  scm_unprotect_object (f->self_scm());
+  scm_unprotect_object (s->self_scm());  
+}
 
 void
 Part_combine_music::transpose (Musical_pitch p)