Add null check for NavigationMesh.create_from_mesh()
This commit is contained in:
parent
4d1f83a621
commit
cf6bfea93f
@ -31,6 +31,8 @@
|
|||||||
#include "navigation_mesh.h"
|
#include "navigation_mesh.h"
|
||||||
|
|
||||||
void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) {
|
void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) {
|
||||||
|
ERR_FAIL_COND(p_mesh.is_null());
|
||||||
|
|
||||||
vertices = Vector<Vector3>();
|
vertices = Vector<Vector3>();
|
||||||
clear_polygons();
|
clear_polygons();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user