Commit 32ee8b7e authored by Samuel Debionne's avatar Samuel Debionne

Check whether the acquisition is still running when detructing CtControl and...

Check whether the acquisition is still running when detructing  CtControl and stop the aquistion accordingly.

This situation may happen when an exception is thrown from Lima and 
caught at a higher level in the application and could lead to SegFault.
parent 7f9e5d16
Pipeline #35605 passed with stages
in 43 minutes
......@@ -390,6 +390,14 @@ CtControl::CtControl(HwInterface *hw) :
CtControl::~CtControl()
{
DEB_DESTRUCTOR();
Status aStatus;
getStatus(aStatus);
if(aStatus.AcquisitionStatus == AcqRunning)
{
DEB_WARNING() << "Acquisition is still running, stopping acquisition";
stopAcq();
}
DEB_TRACE() << "Waiting for all threads to finish their tasks";
PoolThreadMgr& pool_thread_mgr = PoolThreadMgr::get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment