]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fixes issue 1796.
authorMike Solomon <mike@apollinemike.com>
Tue, 9 Aug 2011 06:44:45 +0000 (08:44 +0200)
committerMike Solomon <mike@apollinemike.com>
Tue, 9 Aug 2011 06:44:45 +0000 (08:44 +0200)
Issues a warning if the user tries to add footnotes without a footer.

lily/page-breaking.cc
lily/page-layout-problem.cc

index 2e5854885e02eb432458442628696f329fb844e2..f81683a2573277f2de404409219cba8d31aef005 100644 (file)
@@ -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;
index c9301ff3843f6812c1c39a129df9511c01817aca..2988a091b69436f377c54f4e618584703c9dbaff 100644 (file)
@@ -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);