Guarded a call to add_or_set_value

This commit is contained in:
John Wiegley 2012-03-05 05:53:49 -06:00
parent fa3805282a
commit b3e21e8ae2

View file

@ -606,7 +606,8 @@ bool post_t::valid() const
void post_t::add_to_value(value_t& value, const optional<expr_t&>& expr) const
{
if (xdata_ && xdata_->has_flags(POST_EXT_COMPOUND)) {
add_or_set_value(value, xdata_->compound_value);
if (! xdata_->compound_value.is_null())
add_or_set_value(value, xdata_->compound_value);
}
else if (expr) {
bind_scope_t bound_scope(*expr->get_context(),