src: fix nullptr dereference for signal during startup
This fixes a test failure when running `test/parallel/test-child-process-spawnsync-kill-signal.js` under load. What would happen is that `SignalExit()` tries to shutdown the tracing agent, which might not have been set up by the point that Node.js receives the signal. PR-URL: https://github.com/nodejs/node/pull/20637 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
5a0e379250
commit
5e6ca894cf
@ -327,7 +327,8 @@ static struct {
|
||||
}
|
||||
|
||||
void StopTracingAgent() {
|
||||
tracing_agent_->Stop();
|
||||
if (tracing_agent_)
|
||||
tracing_agent_->Stop();
|
||||
}
|
||||
|
||||
tracing::Agent* GetTracingAgent() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user