Moved the sequencing of a call to node.reset, since the intervening expression

can throw an exception which would leave us with an unexpected NULL pointer.
This commit is contained in:
John Wiegley 2008-07-17 06:12:04 -04:00
parent 45f6aa3f93
commit 0f83b9f0c3

View file

@ -1035,8 +1035,8 @@ value_expr_t * parse_value_term(std::istream& in, scope_t * scope,
unexpected(c, ']');
in.get(c);
node.reset(new value_expr_t(value_expr_t::CONSTANT));
interval_t timespan(buf);
node.reset(new value_expr_t(value_expr_t::CONSTANT));
node->value = new value_t(timespan.first());
break;
}