]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/page-spacing.cc
Fix and document usage of `convert-ly - < test.ly'.
[lilypond.git] / lily / page-spacing.cc
index 7e20f8416c5aa534983068a7987cfab5a85ec78e..c2988d8502e37785a54ebf658932710aa310c6bb 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2006--2011 Joe Neeman <joeneeman@gmail.com>
+  Copyright (C) 2006--2012 Joe Neeman <joeneeman@gmail.com>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -155,6 +155,9 @@ Page_spacer::solve ()
     }
 
   Page_spacing_result ret;
+  if (simple_state_.empty ())
+    return ret;
+
   ret.penalty_ = simple_state_.back ().penalty_
                  + lines_.back ().page_penalty_ + lines_.back ().turn_penalty_;
   ret.system_count_status_ = simple_state_.back ().system_count_status_;