]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context.cc
pdf-scheme: use malloc and g_free to avoid mixing new/free in scm_take_str
[lilypond.git] / lily / context.cc
index 758bcdfda881db504fee52e56319d0693089724c..83b8ae17dd21d6f1e2575f6303a039b921b1b9c1 100644 (file)
@@ -35,7 +35,7 @@
 bool
 Context::is_removable () const
 {
-  return context_list_ == SCM_EOL && ! iterator_count_
+  return context_list_ == SCM_EOL && ! client_count_
          && !dynamic_cast<Global_context const *> (daddy_context_);
 }
 
@@ -82,7 +82,7 @@ Context::Context ()
 {
   daddy_context_ = 0;
   aliases_ = SCM_EOL;
-  iterator_count_ = 0;
+  client_count_ = 0;
   implementation_ = 0;
   properties_scm_ = SCM_EOL;
   accepts_list_ = SCM_EOL;
@@ -489,10 +489,13 @@ Context::instrumented_set_property (SCM sym, SCM val, const char *, int, const c
 void
 Context::internal_set_property (SCM sym, SCM val)
 {
+  bool type_check_ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
+
   if (do_internal_type_checking_global)
-    assert (type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")));
+    assert (type_check_ok);
 
-  properties_dict ()->set (sym, val);
+  if (type_check_ok)
+    properties_dict ()->set (sym, val);
 }
 
 /*