Don't ignore the type mismatch in setter function
(cherry picked from commit 5a7bd296af
)
This commit is contained in:
parent
489b49c6b8
commit
bdf7a0294b
|
@ -961,6 +961,8 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) {
|
||||||
call(member->setter, &val, 1, err);
|
call(member->setter, &val, 1, err);
|
||||||
if (err.error == Variant::CallError::CALL_OK) {
|
if (err.error == Variant::CallError::CALL_OK) {
|
||||||
return true; //function exists, call was successful
|
return true; //function exists, call was successful
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!member->data_type.is_type(p_value)) {
|
if (!member->data_type.is_type(p_value)) {
|
||||||
|
|
Loading…
Reference in New Issue