diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-13 10:49:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-13 10:49:14 +0200 |
commit | 95932ce4f2938b574d57853f3e91b4e63c7d76b4 (patch) | |
tree | a946bfe8f4bfdddfe2731517edeeb36bd91b265e /scene/resources/skeleton_modification_stack_2d.cpp | |
parent | 2ed9bb7e42a33de174da21cd9a5daddae655be0e (diff) | |
parent | 42ad987bb7de8a628cad840300f92d44cac67afb (diff) |
Merge pull request #49558 from timothyqiu/invalid-ref
Diffstat (limited to 'scene/resources/skeleton_modification_stack_2d.cpp')
-rw-r--r-- | scene/resources/skeleton_modification_stack_2d.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/skeleton_modification_stack_2d.cpp b/scene/resources/skeleton_modification_stack_2d.cpp index d12ec4add3..72c1c330ef 100644 --- a/scene/resources/skeleton_modification_stack_2d.cpp +++ b/scene/resources/skeleton_modification_stack_2d.cpp @@ -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); |