summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/optimize.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/optimize.c b/src/optimize.c
index 35487190..e0154beb 100644
--- a/src/optimize.c
+++ b/src/optimize.c
@@ -855,6 +855,8 @@ static struct expr *stmt_nat_expr(struct stmt *nat_stmt)
{
struct expr *nat_expr;
+ assert(nat_stmt->ops->type == STMT_NAT);
+
if (nat_stmt->nat.proto) {
nat_expr = concat_expr_alloc(&internal_location);
compound_expr_add(nat_expr, expr_get(nat_stmt->nat.addr));
@@ -865,6 +867,8 @@ static struct expr *stmt_nat_expr(struct stmt *nat_stmt)
nat_expr = expr_get(nat_stmt->nat.addr);
}
+ assert(nat_expr);
+
return nat_expr;
}