Skip to content

Commit

Permalink
Us4R buffer unregistration will be performed only once.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjarosik committed Dec 17, 2021
1 parent 491d410 commit f029a3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arrus/core/devices/us4r/Us4RImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ void Us4RImpl::stopDevice() {
if (this->buffer != nullptr) {
this->buffer->shutdown();
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
getProbeImpl()->unregisterOutputBuffer(this->buffer.get(), this->us4rBuffer);
if(this->us4rBuffer) {
getProbeImpl()->unregisterOutputBuffer(this->buffer.get(), this->us4rBuffer);
this->us4rBuffer.reset();
}
}
this->state = State::STOPPED;
}
Expand Down

0 comments on commit f029a3d

Please sign in to comment.