Skip to content
Snippets Groups Projects
Commit 08c8c586 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Clear problem's processor motion if this processor is removed

parent d1d8dabf
No related branches found
No related tags found
No related merge requests found
#include "processor_base.h" #include "processor_base.h"
#include "processor_motion.h"
#include "capture_base.h" #include "capture_base.h"
#include "frame_base.h" #include "frame_base.h"
...@@ -52,9 +53,16 @@ void ProcessorBase::remove() ...@@ -52,9 +53,16 @@ void ProcessorBase::remove()
if (!is_removing_) if (!is_removing_)
{ {
is_removing_ = true; is_removing_ = true;
// std::cout << "Removing p" << id() << std::endl;
ProcessorBasePtr this_p = shared_from_this(); ProcessorBasePtr this_p = shared_from_this();
// clear Problem::processor_motion_ptr_
if (isMotion())
{
ProblemPtr P = getProblem();
if(P && P->getProcessorMotionPtr()->id() == this->id())
P->clearProcessorMotion();
}
// remove from upstream // remove from upstream
SensorBasePtr sen = sensor_ptr_.lock(); SensorBasePtr sen = sensor_ptr_.lock();
if(sen) if(sen)
......
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