Browse Source

Fix https://github.com/odin-lang/Odin/issues/522

gingerBill 5 years ago
parent
commit
2cc5c4eed3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/check_expr.cpp

+ 3 - 1
src/check_expr.cpp

@@ -5629,7 +5629,9 @@ CALL_ARGUMENT_CHECKER(check_named_call_arguments) {
 	defer ({
 		for_array(i, ordered_operands) {
 			Operand const &o = ordered_operands[i];
-			call->viral_state_flags |= o.expr->viral_state_flags;
+			if (o.expr != nullptr) {
+				call->viral_state_flags |= o.expr->viral_state_flags;
+			}
 		}
 	});