summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-09-15 00:52:42 +0200
committerGitHub <noreply@github.com>2022-09-15 00:52:42 +0200
commit3f0692f965bb4cc28efe9f7e2f69701509b8a6dc (patch)
treeb883870c2c552a81e95babcd4887ae728f5d1773 /scene/resources
parentecaa7b634e17cf2220c0d10f4cba035309b9dc8c (diff)
parent033abdc59f6385c49891909d44f1c1fc146e59a9 (diff)
Merge pull request #65801 from V-Sekai/skeleton-modification-docs
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/skeleton_modification_stack_2d.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/skeleton_modification_stack_2d.cpp b/scene/resources/skeleton_modification_stack_2d.cpp
index 068c756849..56234a8a14 100644
--- a/scene/resources/skeleton_modification_stack_2d.cpp
+++ b/scene/resources/skeleton_modification_stack_2d.cpp
@@ -182,11 +182,11 @@ void SkeletonModificationStack2D::delete_modification(int p_mod_idx) {
void SkeletonModificationStack2D::set_modification(int p_mod_idx, Ref<SkeletonModification2D> p_mod) {
ERR_FAIL_INDEX(p_mod_idx, modifications.size());
- if (p_mod == nullptr) {
- modifications.insert(p_mod_idx, nullptr);
+ if (p_mod.is_null()) {
+ modifications.write[p_mod_idx] = Ref<SkeletonModification2D>();
} else {
+ modifications.write[p_mod_idx] = p_mod;
p_mod->_setup_modification(this);
- modifications.insert(p_mod_idx, p_mod);
}
#ifdef TOOLS_ENABLED