fix(core): Safety check
This commit is contained in:
parent
aea077cd47
commit
d63c0af5f1
1 changed files with 4 additions and 2 deletions
|
@ -182,7 +182,8 @@ int main(int argc, char **argv)
|
|||
logger->error(e.what());
|
||||
}
|
||||
|
||||
eventloop->stop();
|
||||
if (eventloop)
|
||||
eventloop->stop();
|
||||
|
||||
/**
|
||||
* Terminate forked sub processes
|
||||
|
@ -194,7 +195,8 @@ int main(int argc, char **argv)
|
|||
proc::kill(pid, SIGKILL);
|
||||
}
|
||||
|
||||
eventloop->cleanup();
|
||||
if (eventloop)
|
||||
eventloop->cleanup();
|
||||
|
||||
while (proc::wait_for_completion_nohang() > 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue