diff options
Diffstat (limited to 'staptree.cxx')
-rw-r--r-- | staptree.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/staptree.cxx b/staptree.cxx index 94c04894..7192c4b8 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -1033,7 +1033,10 @@ deep_copy_visitor::visit_if_statement (if_statement* s) if_statement *n = new if_statement; require <expression*> (this, &(n->condition), s->condition); require <statement*> (this, &(n->thenblock), s->thenblock); - require <statement*> (this, &(n->elseblock), s->elseblock); + if (s->elseblock) + require <statement*> (this, &(n->elseblock), s->elseblock); + else + n->elseblock = 0; provide <if_statement*> (this, n); } |