From 0f83b9f0c34e72c01730bb5cf0250f02a5c30a6e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 17 Jul 2008 06:12:04 -0400 Subject: 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. --- valexpr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valexpr.cc b/valexpr.cc index d1cc9322..6afd0805 100644 --- a/valexpr.cc +++ b/valexpr.cc @@ -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; } -- cgit v1.2.3