diff --git a/src/capture/capture_base.cpp b/src/capture/capture_base.cpp index 830b04c57d48b5687b58a07a59d7141bd7dc9248..c4dcb6a0f55f7ed8dd51303135e5357faa4fcaa1 100644 --- a/src/capture/capture_base.cpp +++ b/src/capture/capture_base.cpp @@ -292,7 +292,7 @@ void CaptureBase::setCalibration(const VectorXs& _calib) void CaptureBase::move(FrameBasePtr _frm_ptr) { WOLF_WARN_COND(this->getFrame() == nullptr, "moving a capture not linked to any frame"); - WOLF_WARN_COND(_frm_ptr != nullptr, "moving a capture to a null FrameBasePtr"); + WOLF_WARN_COND(_frm_ptr == nullptr, "moving a capture to a null FrameBasePtr"); // Unlink if (this->getFrame()) @@ -305,6 +305,7 @@ void CaptureBase::move(FrameBasePtr _frm_ptr) // unlink from previous non-key frame this->getFrame()->removeCapture(shared_from_this()); + this->setFrame(nullptr); } // link