diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-10-09 11:46:14 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-10-09 11:46:14 +0100 |
| commit | 2e0b260d3aecb41f2168d6d0481d75897b5763f5 (patch) | |
| tree | dfa63292aebf059b78af5476a3d10d725059a2ab /src/checker/stmt.cpp | |
| parent | e299c3693ee682a38db7141a73596b6a8f67cd1c (diff) | |
SSA - Basic block optimizations
Diffstat (limited to 'src/checker/stmt.cpp')
| -rw-r--r-- | src/checker/stmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checker/stmt.cpp b/src/checker/stmt.cpp index 7dddf00e7..ca397503a 100644 --- a/src/checker/stmt.cpp +++ b/src/checker/stmt.cpp @@ -1279,7 +1279,7 @@ void check_stmt(Checker *c, AstNode *node, u32 flags) { } ast_node(cc, CaseClause, stmt); - AstNode *type_expr = cc->list[0]; + AstNode *type_expr = cc->list.count > 0 ? cc->list[0] : NULL; Type *tag_type = NULL; if (type_expr != NULL) { // Otherwise it's a default expression Operand y = {}; |