From bbc884073d0a4e80a6afd48c286c5d6346b89589 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:55:12 +0000 Subject: [PATCH] lilypond-1.3.83 --- lily/bezier.cc | 7 +++++++ lily/music-sequence.cc | 2 ++ lily/music-wrapper.cc | 1 + lily/part-combine-music.cc | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lily/bezier.cc b/lily/bezier.cc index faf5b899a2..21c49801b5 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -8,6 +8,7 @@ #include #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 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); diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 32c386c323..3ff7f4a235 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -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); diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 641c83b91b..8a2d66f5bd 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -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 diff --git a/lily/part-combine-music.cc b/lily/part-combine-music.cc index 27064244b7..d9e98329b3 100644 --- a/lily/part-combine-music.cc +++ b/lily/part-combine-music.cc @@ -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) -- 2.39.5