]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context.cc
Use a `define-builtin-markup-command' macro for builtin markups, which
[lilypond.git] / lily / context.cc
index 629dfadc4f8aa061155c4361be57e2ecdfe5a568..d4177e77bfa040018e57a085a68740085c915204 100644 (file)
@@ -475,6 +475,12 @@ Context::internal_set_property (SCM sym, SCM val
 #endif
                                )
 {
+#ifndef NDEBUG
+  (void) file;
+  (void) line;
+  (void) fun;
+#endif
+
   if (do_internal_type_checking_global)
     assert (type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")));
 
@@ -509,7 +515,9 @@ void
 Context::remove_context (SCM)
 {
   /* ugh, the translator group should listen to RemoveContext events by itself */
-  implementation ()->disconnect_from_context ();
+  Translator_group *impl = implementation ();
+  if (impl)
+    impl->disconnect_from_context ();
   disconnect_from_parent ();
 }
 
@@ -645,10 +653,15 @@ Context::mark_smob (SCM sm)
   scm_gc_mark (me->definition_mods_);
   scm_gc_mark (me->properties_scm_);
   scm_gc_mark (me->accepts_list_);
+
   if (me->implementation_)
     scm_gc_mark (me->implementation_->self_scm ());
-  if (me->event_source_) scm_gc_mark (me->event_source_->self_scm ());
-  if (me->events_below_) scm_gc_mark (me->events_below_->self_scm ());
+
+  if (me->event_source_)
+    scm_gc_mark (me->event_source_->self_scm ());
+
+  if (me->events_below_)
+    scm_gc_mark (me->events_below_->self_scm ());
 
   return me->properties_scm_;
 }