aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-12-27 10:11:13 +0000
committergingerBill <bill@gingerbill.org>2019-12-27 10:11:13 +0000
commit2cc5c4eed354e7842f37eca61f9a55f6a428930a (patch)
treea3609c442daa540d645c3755d53c970a58678f6e /src/check_expr.cpp
parentf308d8d73ecd30790a643d46ee22e0e153fc28c0 (diff)
Fix https://github.com/odin-lang/Odin/issues/522
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 4e3df54c1..0bbf6031d 100644
--- a/src/check_expr.cpp
+++ b/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;
+ }
}
});