]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/translator-group.cc
* Apply patch from 77c34ddc (Werner Lemberg <wl@gnu.org>)
[lilypond.git] / lily / translator-group.cc
index 64c28ac83dc5ed57fc4addfbe1ad589ec8e8e43b..1980da53d05611cf6db3e2f1d95afa9bc758526f 100644 (file)
@@ -141,15 +141,21 @@ Translator_group::create_child_translator (SCM sev)
 
   for (SCM s = trans_names; scm_is_pair (s); s = scm_cdr (s))
     {
-      Translator *type = get_translator (scm_car (s));
+      SCM definition = scm_car (s);
+
+      Translator *type = 0;
+      if (ly_is_symbol (definition))
+       type = get_translator (definition);
+        
       if (!type)
        warning (_f ("cannot find: `%s'", ly_symbol2string (scm_car (s)).c_str ()));
       else
        {
-         Translator *tr = type->clone ();
-         SCM str = tr->self_scm ();
+         Translator *instance = type->clone ();
+
+         SCM str = instance->self_scm ();
 
-         if (tr->must_be_last ())
+         if (instance->must_be_last ())
            {
              SCM cons = scm_cons (str, SCM_EOL);
              if (scm_is_pair (trans_list))
@@ -160,8 +166,8 @@ Translator_group::create_child_translator (SCM sev)
          else
            trans_list = scm_cons (str, trans_list);
 
-         tr->daddy_context_ = new_context;
-         tr->unprotect ();
+         instance->daddy_context_ = new_context;
+         instance->unprotect ();
        }
     }