From 6ded2e4710d2144c3fae379ae6c6f7dfb7f265c0 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Tue, 27 Mar 2018 18:51:53 +0200 Subject: [PATCH] Fix SEGV in initialization of the problem. --- src/problem-solver.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/problem-solver.cc b/src/problem-solver.cc index f70e3176..c759b3a8 100644 --- a/src/problem-solver.cc +++ b/src/problem-solver.cc @@ -197,9 +197,11 @@ namespace hpp { { problem_ = problem; core::ProblemSolver::initializeProblem (problem_); - problem_->constraintGraph (constraintGraph_); - if (problem_->pathValidation ()) - problem_->pathValidation ()->constraintGraph (constraintGraph_); + if (constraintGraph_) { + problem_->constraintGraph (constraintGraph_); + if (problem_->pathValidation ()) + problem_->pathValidation ()->constraintGraph (constraintGraph_); + } } void ProblemSolver::constraintGraph (const std::string& graphName) -- GitLab