]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context.cc
more gitignore stuff.
[lilypond.git] / lily / context.cc
index d8e5b7bfba32b341f2523cff06350e356d22cc5c..d4177e77bfa040018e57a085a68740085c915204 100644 (file)
@@ -469,15 +469,20 @@ Context::add_alias (SCM sym)
 }
 
 void
+Context::internal_set_property (SCM sym, SCM val
 #ifndef NDEBUG
-Context::internal_set_property (SCM sym, SCM val, char const *file, int line, char const *fun)
+                               , char const *file, int line, char const *fun
+#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?")));
-#else
-Context::internal_set_property (SCM sym, SCM val)
-{
-#endif
 
   properties_dict ()->set (sym, val);
 }
@@ -510,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 ();
 }
 
@@ -646,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_;
 }