]> git.donarmstrong.com Git - lilypond.git/commitdiff
Nested bookparts: fix $papers pop in case of \book block with identifier
authorNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 16 Nov 2008 19:45:37 +0000 (20:45 +0100)
committerNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 16 Nov 2008 19:45:37 +0000 (20:45 +0100)
lily/lily-parser.cc

index c46224fbbc596d4de4123b0de2257dadcfa8f93d..afd401baa95fd3b6a2f22b7a528e5f4d8dc789c5 100644 (file)
@@ -257,8 +257,9 @@ push_paper (Lily_parser *parser, Output_def *paper)
 void
 pop_paper (Lily_parser *parser)
 {
-  parser->lexer_->set_identifier (ly_symbol2scm ("$papers"),
-                                  scm_cdr (parser->lexer_->lookup_identifier ("$papers")));
+  if (! scm_is_null (parser->lexer_->lookup_identifier ("$papers")))
+    parser->lexer_->set_identifier (ly_symbol2scm ("$papers"),
+                                    scm_cdr (parser->lexer_->lookup_identifier ("$papers")));
 }
 
 /* Change the paper on top of $papers stack */