浏览代码

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)