add input validation for set_modification_count
update error macros for set_modification_count
This commit is contained in:
parent
53ae45f657
commit
bdcd98c6ce
|
@ -195,6 +195,7 @@ void SkeletonModificationStack2D::set_modification(int p_mod_idx, Ref<SkeletonMo
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkeletonModificationStack2D::set_modification_count(int p_count) {
|
void SkeletonModificationStack2D::set_modification_count(int p_count) {
|
||||||
|
ERR_FAIL_COND_MSG(p_count < 0, "Modification count cannot be less than zero.");
|
||||||
modifications.resize(p_count);
|
modifications.resize(p_count);
|
||||||
notify_property_list_changed();
|
notify_property_list_changed();
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,7 @@ void SkeletonModificationStack3D::set_modification(int p_mod_idx, Ref<SkeletonMo
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkeletonModificationStack3D::set_modification_count(int p_count) {
|
void SkeletonModificationStack3D::set_modification_count(int p_count) {
|
||||||
|
ERR_FAIL_COND_MSG(p_count < 0, "Modification count cannot be less than zero.");
|
||||||
modifications.resize(p_count);
|
modifications.resize(p_count);
|
||||||
notify_property_list_changed();
|
notify_property_list_changed();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue