Skip to content

Commit

Permalink
Fix Variant::in() error on invalid evaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
cdemirer authored and JeffVenancius committed Feb 13, 2023
1 parent 3e85b0a commit eeed791
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/variant/variant_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,11 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
evaluate(OP_IN, p_index, *this, ret, valid);
if (r_valid) {
*r_valid = valid;
}
if (valid) {
ERR_FAIL_COND_V(ret.type != BOOL, false);
return *VariantGetInternalPtr<bool>::get_ptr(&ret);
} else {
return false;
}
ERR_FAIL_COND_V(ret.type != BOOL, false);
return *VariantGetInternalPtr<bool>::get_ptr(&ret);
}

0 comments on commit eeed791

Please sign in to comment.