diff options
author | Eric Anholt <[email protected]> | 2010-04-29 13:54:19 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-04-29 13:54:19 -0700 |
commit | 438f38c55afc8a31d01af357de95a56044ea7055 (patch) | |
tree | a96fb0523f5c5ed6141ee26f24467a2d33405ee3 /ir_dead_code.cpp | |
parent | a2c6df556655e3619f5a0cd82b0d11aac37c5692 (diff) |
ir_dead_code: Fix segfault on handling a return statement with no value.
Diffstat (limited to 'ir_dead_code.cpp')
-rw-r--r-- | ir_dead_code.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ir_dead_code.cpp b/ir_dead_code.cpp index 81fbeba3213..a73e9ed9bbb 100644 --- a/ir_dead_code.cpp +++ b/ir_dead_code.cpp @@ -251,7 +251,10 @@ ir_dead_code_visitor::visit(ir_call *ir) void ir_dead_code_visitor::visit(ir_return *ir) { - ir->get_value()->accept(this); + ir_rvalue *val = ir->get_value(); + + if (val) + val->accept(this); } |