# HG changeset patch # User mjsousa # Date 1376993469 -3600 # Node ID 27f246b35ac2c5f573bd4393dbcd92ca79156412 # Parent 8cd104e483c6135fd60fdeac3289ae3249a7f509 Stop lvalue check from segfaulting when coming across buggy IL code (IL operator with no operand!) diff -r 8cd104e483c6 -r 27f246b35ac2 stage3/lvalue_check.cc --- a/stage3/lvalue_check.cc Tue Aug 20 11:08:15 2013 +0100 +++ b/stage3/lvalue_check.cc Tue Aug 20 11:11:09 2013 +0100 @@ -243,6 +243,7 @@ void lvalue_check_c::verify_is_lvalue(symbol_c *lvalue) { + if (NULL == lvalue) return; // missing operand in source code being compiled. Error will be caught and reported by datatype checking! int init_error_count = error_count; /* stop the checks once an error has been found... */ if (error_count == init_error_count) check_assignment_to_expression(lvalue); if (error_count == init_error_count) check_assignment_to_controlvar(lvalue);