From 850fb575d098ec1681e63b73c2c7c5b2e85e5b65 Mon Sep 17 00:00:00 2001 From: v4hn Date: Mon, 6 Mar 2017 23:44:59 +0100 Subject: [PATCH] don't add NULL to InterfaceState --- include/moveit_task_constructor/storage.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/moveit_task_constructor/storage.h b/include/moveit_task_constructor/storage.h index f671440e..d0327fa9 100644 --- a/include/moveit_task_constructor/storage.h +++ b/include/moveit_task_constructor/storage.h @@ -22,10 +22,13 @@ MOVEIT_CLASS_FORWARD(InterfaceState); struct InterfaceState { InterfaceState(planning_scene::PlanningSceneConstPtr ps, SubTrajectory* previous, SubTrajectory* next) - : state(ps), - previous_trajectory(1, previous), - next_trajectory(1, next) - {} + : state(ps) + { + if( previous ) + previous_trajectory.push_back(previous); + if( next ) + next_trajectory.push_back(next); + } std::vector previous_trajectory; std::vector next_trajectory;