Skip to content

Commit d1515c1

Browse files
committed
null check
1 parent 2423a90 commit d1515c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/openvic-simulation/scripts/Condition.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ bool ConditionNode::evaluate(Context const& context) const {
3939
return false;
4040
}
4141

42+
if (condition == nullptr) {
43+
return false;
44+
}
45+
4246
if (!share_scope_type(condition->scope, context.get_scope_type())) {
4347
return false;
4448
}

0 commit comments

Comments
 (0)