ir_dead_code: Fix segfault on handling a return statement with no value.
diff --git a/ir_dead_code.cpp b/ir_dead_code.cpp
index 81fbeba..a73e9ed 100644
--- a/ir_dead_code.cpp
+++ b/ir_dead_code.cpp
@@ -251,7 +251,10 @@
 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);
 }