Fix `Variant::in()` error on invalid `evaluate`
This commit is contained in:
parent
b7723a01d9
commit
44b2747dfd
|
@ -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