From 4a919d292d83ba7ce3bb5b7ce2883a51c4e5bc31 Mon Sep 17 00:00:00 2001
From: hanwen <hanwen>
Date: Tue, 22 Jun 2004 17:36:00 +0000
Subject: [PATCH] (My_lily_parser): only copy lexer if it exists

---
 ChangeLog                 | 5 +++++
 Documentation/GNUmakefile | 2 +-
 lily/my-lily-lexer.cc     | 2 +-
 lily/my-lily-parser.cc    | 3 ++-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dd104ef970..3db38215ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-22  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+	* lily/my-lily-parser.cc (My_lily_parser): only copy lexer if it
+	exists
+
 2004-06-22  Jan Nieuwenhuizen  <janneke@gnu.org>
 
 	* scm/output-gnome.scm: 
diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile
index 2fbfeeae17..8bf2f26264 100644
--- a/Documentation/GNUmakefile
+++ b/Documentation/GNUmakefile
@@ -6,7 +6,7 @@ STEPMAKE_TEMPLATES=documentation texinfo tex
 LOCALSTEPMAKE_TEMPLATES=lilypond ly
 LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
 README_TOP_FILES= DEDICATION ChangeLog
-EXTRA_DIST_FILES= 
+EXTRA_DIST_FILES= texinfo.css
 
 include $(depth)/make/stepmake.make 
 
diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc
index 6accfaa91d..bf251d11ce 100644
--- a/lily/my-lily-lexer.cc
+++ b/lily/my-lily-lexer.cc
@@ -101,7 +101,7 @@ My_lily_lexer::My_lily_lexer (Sources *sources)
 My_lily_lexer::My_lily_lexer (My_lily_lexer const &src)
   : Includable_lexer ()
 {
-  keytable_ = new Keyword_table (*src.keytable_);
+  keytable_ =  (src.keytable_) ? new Keyword_table (*src.keytable_) : 0;
   encoding_ = src.encoding_;
   chordmodifier_tab_ = src.chordmodifier_tab_;
   pitchname_tab_stack_ = src.pitchname_tab_stack_;
diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc
index 100b2c4771..44c8581719 100644
--- a/lily/my-lily-parser.cc
+++ b/lily/my-lily-parser.cc
@@ -47,7 +47,8 @@ My_lily_parser::My_lily_parser (My_lily_parser const &src)
   last_beam_start_ = src.last_beam_start_;
 
   smobify_self ();
-  lexer_ = new My_lily_lexer (*src.lexer_);
+  if (src.lexer_)
+    lexer_ = new My_lily_lexer (*src.lexer_);
 }
 
 My_lily_parser::~My_lily_parser ()
-- 
2.39.5