]> git.donarmstrong.com Git - lilypond.git/commitdiff
plug memory leak in book identifiers.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 6 Jan 2007 15:37:38 +0000 (16:37 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 6 Jan 2007 15:37:38 +0000 (16:37 +0100)
lily/book.cc

index 44f7ee4ef933f7f206c151c1b4738c72aece689c..2bf7b585752bc7c199c050efa0061078ad34c412 100644 (file)
@@ -44,13 +44,17 @@ Book::Book (Book const &s)
   smobify_self ();
 
   if (s.paper_)
-    paper_ = s.paper_->clone ();
+    {
+      paper_ = s.paper_->clone ();
+      paper_->unprotect ();
+    }
   
   input_location_ = make_input (*s.origin ());
+
   header_ = ly_make_anonymous_module (false);
   if (ly_is_module (s.header_))
     ly_module_copy (header_, s.header_);
-
+  
   SCM *t = &scores_;
   for (SCM p = s.scores_; scm_is_pair (p); p = scm_cdr (p))
     {