From 1ad7da20136c4307bac19bf317bc6d4e1149d647 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Tue, 20 Feb 2018 18:47:34 +0100 Subject: [PATCH] Check that graph is valid in GraphSteeringMethod::impl_compute --- src/graph-steering-method.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graph-steering-method.cc b/src/graph-steering-method.cc index 4463888..88fbfb1 100644 --- a/src/graph-steering-method.cc +++ b/src/graph-steering-method.cc @@ -78,6 +78,8 @@ namespace hpp { PathPtr_t GraphSteeringMethod::impl_compute (ConfigurationIn_t q1, ConfigurationIn_t q2) const { graph::Edges_t possibleEdges; + if (!problem_.constraintGraph()) + throw std::invalid_argument ("The constraint graph should be set to use the GraphSteeringMethod"); const graph::Graph& graph = *problem_.constraintGraph (); try { possibleEdges = graph.getEdges -- GitLab