Don't ignore the type mismatch in setter function
This commit is contained in:
parent
72fb4d7b09
commit
5a7bd296af
1 changed files with 2 additions and 0 deletions
|
@ -961,6 +961,8 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) {
|
|||
call(member->setter, &val, 1, err);
|
||||
if (err.error == Variant::CallError::CALL_OK) {
|
||||
return true; //function exists, call was successful
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!member->data_type.is_type(p_value)) {
|
||||
|
|
Loading…
Reference in a new issue