Real penalty = blank_page_penalty ();
n_res.demerits_ += penalty;
- n_res.force_.back () += penalty;
+
+ if (n_res.force_.size ())
+ n_res.force_.back () += penalty;
return (m_res.demerits_ < n_res.demerits_) ? m_res : n_res;
}
Page_spacing_result
Page_breaking::finalize_spacing_result (vsize configuration, Page_spacing_result res)
{
+ if (res.force_.empty ())
+ return res;
+
cache_line_details (configuration);
res.systems_per_page_ = uncompress_solution (res.systems_per_page_, cached_line_details_);