]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/book.cc
* Documentation/user/point-and-click.itely: simplify p&c
[lilypond.git] / lily / book.cc
index 96a66ce00cb0c9ad81b748857b938fb23e4d4507..e8d0252b2158da5347a26fbf09011f1970c02b67 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "book.hh"
@@ -38,6 +38,12 @@ Book::Book ()
   smobify_self ();
 }
 
+Book* 
+Book::clone () const
+{
+  return new Book (*this);
+}
+
 Book::~Book ()
 {
 }
@@ -86,8 +92,10 @@ Book::process (Output_def *default_paper,
       if (score->error_found_)
        return 0;
 
-  Output_def *paper = paper_ ? default_paper : paper_;
-
+  Output_def *paper = paper_ ? paper_ : default_paper;
+  if (!paper)
+    return 0;
+  
   Paper_book *paper_book = new Paper_book ();
   Real scale = scm_to_double (paper->c_variable ("outputscale"));
   Output_def *scaled_bookdef = scale_output_def (paper, scale);
@@ -134,3 +142,4 @@ Book::process (Output_def *default_paper,
   scm_remember_upto_here_1 (scm_key);
   return paper_book;
 }
+