소스 검색

Merge pull request #35543 from timothyqiu/notification-crash

Fixes crash in Spatial::notification
Rémi Verschelde 5 년 전
부모
커밋
f67814116a
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/3d/spatial.cpp

+ 1 - 0
scene/3d/spatial.cpp

@@ -125,6 +125,7 @@ void Spatial::_notification(int p_what) {
 
 	switch (p_what) {
 		case NOTIFICATION_ENTER_TREE: {
+			ERR_FAIL_COND(!get_tree());
 
 			Node *p = get_parent();
 			if (p)