Merge pull request #46617 from sps1112/fix-navigationmesh-crash
Add null check in NavigationMesh.new().create_from_mesh(BoxShape.new())
This commit is contained in:
commit
864caf5711
1 changed files with 2 additions and 0 deletions
|
@ -31,6 +31,8 @@
|
|||
#include "navigation_mesh.h"
|
||||
|
||||
void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) {
|
||||
ERR_FAIL_COND(p_mesh.is_null());
|
||||
|
||||
vertices = Vector<Vector3>();
|
||||
clear_polygons();
|
||||
|
||||
|
|
Loading…
Reference in a new issue