Skip to content

Commit

Permalink
fixed issue detected by Sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
randaz81 committed Nov 28, 2023
1 parent a3ae505 commit 9f4f005
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int Companion::write(const char *name, int ntargets, char *targets[], double per
}
}

if (period>0)
if (writer_thread)
{
writer_thread->write(bot);
}
Expand Down Expand Up @@ -189,7 +189,7 @@ int Companion::write(const char *name, int ntargets, char *targets[], double per
port.write(bot);
}

if (period > 0)
if (writer_thread)
{
writer_thread->stop();
delete writer_thread;
Expand Down

0 comments on commit 9f4f005

Please sign in to comment.