From: Mike Solomon Date: Thu, 14 Jul 2011 20:02:49 +0000 (+0200) Subject: Institutes property checks for non-event context property settings. X-Git-Tag: release/2.15.6-1~3^2~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a811a3c91c05f33474c1d447bedaa1e089522532;p=lilypond.git Institutes property checks for non-event context property settings. This fixes issue 1734 in addition to any potential incorrect settings of properties in the layout block. While this entails a property check for all property settings in the ly/ folder, the time this takes is negligible. --- diff --git a/lily/context.cc b/lily/context.cc index 4dbb6e5657..0d7fbe35f6 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -490,10 +490,13 @@ Context::instrumented_set_property (SCM sym, SCM val, const char*, int, const ch 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); } /*