Merge pull request #49558 from timothyqiu/invalid-ref

This commit is contained in:
Rémi Verschelde 2021-06-13 10:49:14 +02:00 committed by GitHub
commit 95932ce4f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,6 +160,8 @@ Ref<SkeletonModification2D> SkeletonModificationStack2D::get_modification(int p_
}
void SkeletonModificationStack2D::add_modification(Ref<SkeletonModification2D> p_mod) {
ERR_FAIL_COND(!p_mod.is_valid());
p_mod->_setup_modification(this);
modifications.push_back(p_mod);