소스 검색

Merge pull request #17171 from hpvb/fix-17153

Don't crash when trying to add an invalid navmesh
Rémi Verschelde 7 년 전
부모
커밋
4ccc8e57f9
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/3d/navigation.cpp

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

@@ -35,6 +35,7 @@ void Navigation::_navmesh_link(int p_id) {
 	ERR_FAIL_COND(!navmesh_map.has(p_id));
 	NavMesh &nm = navmesh_map[p_id];
 	ERR_FAIL_COND(nm.linked);
+	ERR_FAIL_COND(nm.navmesh.is_null());
 
 	PoolVector<Vector3> vertices = nm.navmesh->get_vertices();
 	int len = vertices.size();