summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-28 10:17:57 +0200
committerGitHub <noreply@github.com>2021-10-28 10:17:57 +0200
commit0767a1c3f5c690d1685265f35ce8a4d58800bbb1 (patch)
treeae4fb799023ebe206800983647e91fedced8b151 /scene/resources
parentc24bdfb327fd913d9706e020de1be2a6b79e4271 (diff)
parent7715301c661b55a2388dad4d9a7321b66bc34be8 (diff)
Merge pull request #54331 from LennyPhoenix/lennyphoenix-patch-2
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/skeleton_modification_2d_lookat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/skeleton_modification_2d_lookat.cpp b/scene/resources/skeleton_modification_2d_lookat.cpp
index 2da770f012..740937fc44 100644
--- a/scene/resources/skeleton_modification_2d_lookat.cpp
+++ b/scene/resources/skeleton_modification_2d_lookat.cpp
@@ -241,7 +241,7 @@ int SkeletonModification2DLookAt::get_bone_index() const {
void SkeletonModification2DLookAt::set_bone_index(int p_bone_idx) {
ERR_FAIL_COND_MSG(p_bone_idx < 0, "Bone index is out of range: The index is too low!");
- if (is_setup) {
+ if (is_setup && stack) {
if (stack->skeleton) {
ERR_FAIL_INDEX_MSG(p_bone_idx, stack->skeleton->get_bone_count(), "Passed-in Bone index is out of range!");
bone_idx = p_bone_idx;