Bugfix when calling destructor without a running thread

This commit is contained in:
Tim Zeuner 2023-01-15 22:36:27 +01:00
parent 1fd6853245
commit bbc154efe2

View File

@ -19,8 +19,11 @@ LFR::LFR(int videoHeight, int videoWidth, int thresholdBinary, int gaussKernelSi
LFR::~LFR() LFR::~LFR()
{ {
endLoop(); endLoop();
if(thread)
{
thread->join(); thread->join();
} }
}
void LFR::removeListener(LFR::ListenerKey key) void LFR::removeListener(LFR::ListenerKey key)
{ {