added check

This commit is contained in:
2026-03-11 14:23:12 +03:00
parent 1d54039f57
commit 8bbd504356

View File

@@ -32,7 +32,8 @@ namespace omath::pathfinding
void NavigationMesh::set_event(const Vector3<float>& vertex, std::string event_id) void NavigationMesh::set_event(const Vector3<float>& vertex, std::string event_id)
{ {
m_vertex_events[vertex] = std::move(event_id); if (m_vertex_map.contains(vertex))
m_vertex_events[vertex] = std::move(event_id);
} }
void NavigationMesh::clear_event(const Vector3<float>& vertex) void NavigationMesh::clear_event(const Vector3<float>& vertex)