Skip to content
Snippets Groups Projects
Commit 0056f469 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

implemented exception of unlink a capture in case of non-KF

parent 6e86aca1
No related branches found
No related tags found
1 merge request!274Resolve "Emplace API inconsistent with ProcessorTrackerFeature/Landmark functions"
This commit is part of merge request !274. Comments created here will be created in the context of that merge request.
......@@ -291,7 +291,11 @@ void CaptureBase::setCalibration(const VectorXs& _calib)
void CaptureBase::link(FrameBasePtr _frm_ptr)
{
assert(this->getFrame() == nullptr && "linking an already linked capture");
assert((this->getFrame() == nullptr || !this->getFrame()->isKey()) && "linking a capture already linked to a KF");
// unlink from previous non-key frame
if (this->getFrame())
this->getFrame()->removeCapture(shared_from_this());
if(_frm_ptr)
{
......
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