From bf143dc4399139ab4f2224471155c3f8b8eda542 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 5 Apr 2005 20:19:38 +0000
Subject: [PATCH] *** empty log message ***

---
 ChangeLog           | 6 +++++-
 lily/grob.cc        | 2 +-
 lily/midi-stream.cc | 4 ++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 985c9113c1..6ec96d8683 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,11 @@
 
 2005-04-05  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-	* lily/midi-stream.cc: Handle unwritable midi file.
+	* lily/grob.cc (mark_smob): Check pscore->layout_ before
+	dereferencing.  Fixes make web.
+
+	* lily/midi-stream.cc: Handle unwritable midi file.  Include
+	errno.h.
 
 	* Documentation/user/: Fix links.
 
diff --git a/lily/grob.cc b/lily/grob.cc
index ea8c1a5609..9d57cb094d 100644
--- a/lily/grob.cc
+++ b/lily/grob.cc
@@ -664,7 +664,7 @@ Grob::mark_smob (SCM ses)
   if (s->original_)
     scm_gc_mark (s->original_->self_scm ());
 
-  if (s->pscore_)
+  if (s->pscore_ && s->pscore_->layout_)
     scm_gc_mark (s->pscore_->layout_->self_scm ());
 
   s->do_derived_mark ();
diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc
index 7651b3fe6f..7c697dc2a8 100644
--- a/lily/midi-stream.cc
+++ b/lily/midi-stream.cc
@@ -7,10 +7,10 @@
 */
 
 
-#include <errno.h>
-
 #include "midi-stream.hh"
 
+#include <errno.h>
+
 #include "stream.hh"
 #include "string-convert.hh"
 #include "main.hh"
-- 
2.39.5