]> 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 20:48:42 +0000 (21:48 +0100)
lily/book.cc

index f307bcf3c31c830a1523f29788c828c71ef6bece..e9f2e3ea2ffdb7416ebac4c1f5178f2629505353 100644 (file)
@@ -46,13 +46,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))
     {