From 34ca9f3b910127667614b138fc2a96ca24c8518c Mon Sep 17 00:00:00 2001 From: helloshuangzi Date: Tue, 8 May 2018 16:34:55 -0700 Subject: [PATCH] inspector: fix inspector::Agent::HasConnectedSessions PR-URL: https://github.com/nodejs/node/pull/20614 Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- src/inspector_agent.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 391d3bc0379..c8e62f6f0a2 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -693,6 +693,8 @@ bool Agent::IsWaitingForConnect() { } bool Agent::HasConnectedSessions() { + if (client_ == nullptr) + return false; return client_->hasConnectedSessions(); }