diff --git a/tools/qfcc/source/switch.c b/tools/qfcc/source/switch.c index f6b05547c..80321a9ab 100644 --- a/tools/qfcc/source/switch.c +++ b/tools/qfcc/source/switch.c @@ -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;