Explorar o código

Add null check for NavigationMesh.create_from_mesh()

(cherry picked from commit cf6bfea93ff2a1e2b166de07bc8a0625230f3cad)
sps1112 %!s(int64=4) %!d(string=hai) anos
pai
achega
6ea1e97e06
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      scene/3d/navigation_mesh.cpp

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

@@ -33,6 +33,7 @@
 #include "navigation.h"
 
 void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) {
+	ERR_FAIL_COND(p_mesh.is_null());
 
 	vertices = PoolVector<Vector3>();
 	clear_polygons();