From: Mike Solomon Date: Tue, 9 Aug 2011 06:44:45 +0000 (+0200) Subject: Fixes issue 1796. X-Git-Tag: release/2.15.9-1~28 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=435b36a3e6576cebf794d815ae7cc78b652180f9;p=lilypond.git Fixes issue 1796. Issues a warning if the user tries to add footnotes without a footer. --- diff --git a/lily/page-breaking.cc b/lily/page-breaking.cc index 2e5854885e..f81683a257 100644 --- a/lily/page-breaking.cc +++ b/lily/page-breaking.cc @@ -577,7 +577,8 @@ Page_breaking::draw_page (SCM systems, SCM configuration, int page_num, int foot Page_layout_problem::add_footnotes_to_footer (footnotes, foot, book_); - p->set_property ("foot-stencil", foot->smobbed_copy ()); + if (foot) + p->set_property ("foot-stencil", foot->smobbed_copy ()); scm_apply_1 (page_stencil, page, SCM_EOL); return page; diff --git a/lily/page-layout-problem.cc b/lily/page-layout-problem.cc index c9301ff384..2988a091b6 100644 --- a/lily/page-layout-problem.cc +++ b/lily/page-layout-problem.cc @@ -277,6 +277,11 @@ Page_layout_problem::get_footnote_separator_stencil (Output_def *paper) void Page_layout_problem::add_footnotes_to_footer (SCM footnotes, Stencil *foot, Paper_book *pb) { + if (!foot && scm_is_pair (footnotes)) + { + warning ("Must have a footer to add footnotes."); + return; + } bool footnotes_found = false; Real footnote_padding = robust_scm2double (pb->paper_->c_variable ("footnote-padding"), 0.0); Real footnote_footer_padding = robust_scm2double (pb->paper_->c_variable ("footnote-footer-padding"), 0.0);