]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie-formatting-problem.cc
add string-or-symbol?
[lilypond.git] / lily / tie-formatting-problem.cc
index d22d54bb6a28d43719a13ca5cc1b5111d6af6e88..4dada25d220116b68dfc8f6a70b8a7e962a53a1e 100644 (file)
@@ -514,13 +514,21 @@ Tie_formatting_problem::generate_configuration (int pos, Direction dir,
 Interval
 Tie_formatting_problem::get_head_extent (int col, Direction d, Axis a) const
 {
-  return (*head_extents_.find (Tuple2<int> (col, int (d)))).second[a];
+  Column_extent_map::const_iterator i = head_extents_.find (Tuple2<int> (col, int (d)));
+  if (i != head_extents_.end ())
+    return (*i).second[a];
+  else
+    return Interval ();
 }
 
 Interval
 Tie_formatting_problem::get_stem_extent (int col, Direction d, Axis a) const
 {
-  return (*stem_extents_.find (Tuple2<int> (col, int (d)))).second[a];
+  Column_extent_map::const_iterator i = stem_extents_.find (Tuple2<int> (col, int (d)));
+  if (i != stem_extents_.end ())
+    return (*i).second[a];
+  else
+    return Interval ();
 }
 
 /**