nullify path on destruction and check if adding new trajectories

This commit is contained in:
wmayer
2018-08-16 16:04:24 +02:00
parent 6e6ee94c9b
commit ab64ed068a

View File

@@ -93,7 +93,8 @@ namespace KDL {
vt.insert(vt.end(),elem);
duration += elem->Duration();
vd.insert(vd.end(),duration);
path->Add(elem->GetPath(),false); // FreeCAD change
if (path)
path->Add(elem->GetPath(),false); // FreeCAD change
}
void Trajectory_Composite::Destroy() {
@@ -105,6 +106,7 @@ namespace KDL {
vd.erase(vd.begin(),vd.end());
delete path; // FreeCAD change
path = nullptr; // FreeCAD change
}
Trajectory_Composite::~Trajectory_Composite() {