From cf6bfea93ff2a1e2b166de07bc8a0625230f3cad Mon Sep 17 00:00:00 2001 From: sps1112 Date: Wed, 3 Mar 2021 15:59:30 +0530 Subject: [PATCH] Add null check for NavigationMesh.create_from_mesh() --- scene/resources/navigation_mesh.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp index 84f3c23f77c..8c12f59a006 100644 --- a/scene/resources/navigation_mesh.cpp +++ b/scene/resources/navigation_mesh.cpp @@ -31,6 +31,8 @@ #include "navigation_mesh.h" void NavigationMesh::create_from_mesh(const Ref &p_mesh) { + ERR_FAIL_COND(p_mesh.is_null()); + vertices = Vector(); clear_polygons();