Only join/delete E1.31 keepalive thread if it has actually been created
This commit is contained in:
parent
1f2d298e14
commit
2afddf9bbf
1 changed files with 7 additions and 3 deletions
|
|
@ -293,9 +293,13 @@ RGBController_E131::RGBController_E131(std::vector<E131Device> device_list)
|
|||
|
||||
RGBController_E131::~RGBController_E131()
|
||||
{
|
||||
keepalive_thread_run = 0;
|
||||
keepalive_thread->join();
|
||||
delete keepalive_thread;
|
||||
if(keepalive_thread != nullptr)
|
||||
{
|
||||
keepalive_thread_run = 0;
|
||||
keepalive_thread->join();
|
||||
delete keepalive_thread;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Delete the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue