From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Tue, 16 Aug 2005 15:59:59 +0000 (+0000)
Subject: (get_header): copy module, instead of
X-Git-Tag: release/2.7.6~38
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b6a3535923f893b4c593203c3421361ae02eba7c;p=lilypond.git

(get_header): copy module, instead of
returning it.
---

diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc
index 4e3d6c58cb..059d5a8153 100644
--- a/lily/lily-parser.cc
+++ b/lily/lily-parser.cc
@@ -218,6 +218,12 @@ get_header (Lily_parser *parser)
   SCM id = parser->lexer_->lookup_identifier ("$defaultheader");
   if (!ly_is_module (id))
     id = ly_make_anonymous_module (be_safe_global);
-
+  else
+    {
+      nid = ly_make_anonymous_module (false);
+      ly_module_copy(nid,id);
+      id = nid;
+    }
+  
   return id;
 }