]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-constructor.cc
* lily/ledger-line-spanner.cc (print): swap linear_combination
[lilypond.git] / lily / music-constructor.cc
index 51a2497ec6f95e9752418d1d8f16e280e6659084..e86672d7c7db6b6eccafc1a5b2979443485c56a6 100644 (file)
@@ -3,12 +3,16 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 2001--2002  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include <map>                 // UGH.
+#include <assert.h>
+
+#include "warn.hh"
 #include "music-constructor.hh"
+
 typedef Music* (*Music_ctor) ();
 
 static std::map<String,Music_ctor> *ctors_map_;
@@ -35,6 +39,11 @@ get_music_ctor (String s)
 Music* 
 make_music (String s)
 {
-  return (*get_music_ctor (s)) () ;
+  Music_ctor c = get_music_ctor (s);
+  if (!c)
+    programming_error (String ("No constructor for music: ") + s);
+  assert (c);
+  
+  return (*c) ();
 }