소스 검색

Merge pull request #54331 from LennyPhoenix/lennyphoenix-patch-2

Rémi Verschelde 3 년 전
부모
커밋
0767a1c3f5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scene/resources/skeleton_modification_2d_lookat.cpp

+ 1 - 1
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;