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:
Rémi Verschelde 2021-03-03 17:01:35 +01:00 committed by GitHub
commit 864caf5711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();