]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/slur.cc (broken_trend_offset): robustness fix.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 16 Feb 2004 15:21:24 +0000 (15:21 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 16 Feb 2004 15:21:24 +0000 (15:21 +0000)
* lily/context.cc (find_create_context): go to Score if it exists.

ChangeLog
lily/context-def.cc
lily/context.cc
lily/score-context.cc
lily/slur.cc

index 0d24b11d59303abd85db13e462a21c61ed501b6c..c4d1e59f183300a711199418040695e86dae5acf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-02-16  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/slur.cc (broken_trend_offset): robustness fix.
+
+       * VERSION: release 2.1.24
+
        * lily/context.cc (find_create_context): go to Score if it exists.
 
        * lily/context-scheme.cc: new file.
index c976fb63255e52824efdc4f0de4cf851aac406df..d91c60a03b966a0e0247f4d992ac7142fe20ce46 100644 (file)
@@ -38,6 +38,7 @@ Context_def::mark_smob (SCM smob)
   scm_gc_mark (me->translator_mods_);
   scm_gc_mark (me->property_ops_);  
   scm_gc_mark (me->translator_group_type_);
+
   return me->context_name_;
 }
 
index 6dff7f838bab86575324979414078f7521cb2f54..0374885195ea6af735772a082cf6eb49e0d6238b 100644 (file)
@@ -25,7 +25,6 @@ Context::is_removable () const
     ;
 }
 
-
 void
 Context::check_removal ()
 {
@@ -99,7 +98,8 @@ Context::Context ()
 Context *
 Context::find_existing_context (SCM n, String id)
 {
-  if ((is_alias (n) && (id_string_ == id || id.is_empty ())) || n == ly_symbol2scm ("Current"))
+  if ((is_alias (n) && (id_string_ == id || id.is_empty ()))
+      || n == ly_symbol2scm ("Current"))
     return this;
 
   Context* r = 0;
index fe78acdf5a382e3fbb06aaf7ab0c627680396cd0..4048df84de64d921464896cc9b5effed92ff39ac 100644 (file)
@@ -1,17 +1,14 @@
 /*   
-score-context.cc -- implement
+       score-context.cc -- implement Score_context
 
-source file of the GNU LilyPond music typesetter
-
-(c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
- */
+       source file of the GNU LilyPond music typesetter
 
+       (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
 
 #include "score-context.hh"
 #include "score-translator.hh"
 
-
 void
 Score_context::prepare (Moment w)
 {
index ad1d6097c0e8cf7008a2e46587dd115f99a0096a..3b3ff7f1292994baf436c2a39bae1cba9f0a8808 100644 (file)
@@ -258,7 +258,11 @@ Slur::broken_trend_offset (Grob *me, Direction dir)
   if (Spanner *mother =  dynamic_cast<Spanner*> (me->original_))
     {
       int k = broken_spanner_index (dynamic_cast<Spanner*> (me));
-      Grob *neighbour = mother->broken_intos_[k + dir];      
+      int j = k + dir;
+      if (j < 0 || j >= mother->broken_intos_.size ())
+       return o;
+      
+      Grob *neighbour = mother->broken_intos_[j];      
       if (dir == RIGHT)
        neighbour->set_grob_property ("direction",
                                      me->get_grob_property ("direction"));