X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext.cc;h=d4177e77bfa040018e57a085a68740085c915204;hb=78f563e58de2de28fd17067fd434a42cb9f055a5;hp=629dfadc4f8aa061155c4361be57e2ecdfe5a568;hpb=ef10cec74c5c8f4821907f75c474d75c17d04d42;p=lilypond.git diff --git a/lily/context.cc b/lily/context.cc index 629dfadc4f..d4177e77bf 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -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_; }