You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Check for type mismatch in PropertyTweener.from()
This commit is contained in:
@@ -489,6 +489,11 @@ Tween::Tween(bool p_valid) {
|
||||
}
|
||||
|
||||
Ref<PropertyTweener> PropertyTweener::from(Variant p_value) {
|
||||
ERR_FAIL_COND_V(tween.is_null(), nullptr);
|
||||
if (!tween->_validate_type_match(p_value, final_val)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
initial_val = p_value;
|
||||
do_continue = false;
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user