mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 09:51:41 +00:00
Fix a segfault with switch on an undefined symbol.
Forgot to check if the test expression was not an error.
This commit is contained in:
parent
f163e35f21
commit
932647bad3
1 changed files with 4 additions and 0 deletions
|
@ -405,6 +405,10 @@ switch_expr (switch_block_t *switch_block, expr_t *break_label,
|
|||
int saved_line = pr.source_line;
|
||||
string_t saved_file = pr.source_file;
|
||||
|
||||
if (switch_block->test->type == ex_error) {
|
||||
return switch_block->test;
|
||||
}
|
||||
|
||||
pr.source_line = sw_val->line = switch_block->test->line;
|
||||
pr.source_file = sw_val->file = switch_block->test->file;
|
||||
|
||||
|
|
Loading…
Reference in a new issue