]> git.donarmstrong.com Git - lilypond.git/commitdiff
Adds programming error for empty config vector in beam-quanting.cc.
authorMike Solomon <mike@apollinemike.com>
Mon, 4 Apr 2011 14:41:08 +0000 (10:41 -0400)
committerMike Solomon <mike@apollinemike.com>
Mon, 4 Apr 2011 14:41:08 +0000 (10:41 -0400)
This avoids a segmentation fault when the queue.top () is called.

lily/beam-quanting.cc

index e868e51d7f124af9c4ee4a690a19890314569429..e1116308ed24f18187db2b7c7e2f522e996cb7f1 100644 (file)
@@ -447,6 +447,12 @@ Beam_scoring_problem::solve () const {
   vector<Beam_configuration*> configs;
   generate_quants (&configs);
 
+  if (configs.empty ())
+    {
+      programming_error ("No viable beam quanting found.  Using unquanted y value.");
+      return unquanted_y;
+    }
+
   Beam_configuration *best = NULL;  
 
   bool debug =