From: David Kastrup Date: Thu, 23 May 2013 20:03:10 +0000 (+0200) Subject: Issue 3375: Fix accounting problem in page breaking X-Git-Tag: release/2.17.19-1~8^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dcace4c82a3d5dfa679a3331128c98febbec925c;p=lilypond.git Issue 3375: Fix accounting problem in page breaking The code \markup \stencil #(ly:make-stencil '() empty-interval empty-interval) \markup * \markup * \markup * \markup * distributed itself across 5 pages because page accounting was thrown off by empty intervals. While the effects were smaller (and did not propagate to the next page) with the less radically empty intervals employed as extents of empty-stencil, they were still present. --- diff --git a/lily/constrained-breaking.cc b/lily/constrained-breaking.cc index ee8b28906c..8d3b6967e4 100644 --- a/lily/constrained-breaking.cc +++ b/lily/constrained-breaking.cc @@ -571,7 +571,9 @@ Line_details::Line_details (Prob *pb, Output_def *paper) last_column_ = 0; force_ = 0; - Interval stencil_extent = unsmob_stencil (pb->get_property ("stencil"))->extent (Y_AXIS); + Stencil *st = unsmob_stencil (pb->get_property ("stencil")); + Interval stencil_extent = st->is_empty () ? Interval (0, 0) + : st->extent (Y_AXIS); shape_ = Line_shape (stencil_extent, stencil_extent); // pretend it goes all the way across tallness_ = 0; bottom_padding_ = 0;