Skip to content
Snippets Groups Projects
Commit b97c543e authored by Simon Ottenhaus's avatar Simon Ottenhaus
Browse files

fixed controller deletion

parent 5bffe9ec
No related branches found
No related tags found
No related merge requests found
......@@ -79,13 +79,14 @@ void VelocityControllerHelper::setNullSpaceControl(bool enabled)
void VelocityControllerHelper::cleanup()
{
controller->deactivateController();
if (controllerCreated)
{
while (controller->isControllerActive())
{
TimeUtil::SleepMS(1);
}
controller->deleteController();
// delete controller only if it was created
controller->deactivateAndDeleteController();
}
else
{
// if the controller existed, only deactivate it
controller->deactivateController();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment