Merge pull request #62921 from cdemirer/fix-variant-in
Fix `Variant::in()` error on invalid `evaluate`
This commit is contained in:
commit
4a2c2170b4
|
@ -1105,8 +1105,11 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
|
||||||
evaluate(OP_IN, p_index, *this, ret, valid);
|
evaluate(OP_IN, p_index, *this, ret, valid);
|
||||||
if (r_valid) {
|
if (r_valid) {
|
||||||
*r_valid = valid;
|
*r_valid = valid;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
if (valid) {
|
||||||
ERR_FAIL_COND_V(ret.type != BOOL, false);
|
ERR_FAIL_COND_V(ret.type != BOOL, false);
|
||||||
return *VariantGetInternalPtr<bool>::get_ptr(&ret);
|
return *VariantGetInternalPtr<bool>::get_ptr(&ret);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue