diff --git a/atom/browser/node_debugger.cc b/atom/browser/node_debugger.cc index 769bdfbbd247..1f43f47fb1c4 100644 --- a/atom/browser/node_debugger.cc +++ b/atom/browser/node_debugger.cc @@ -13,11 +13,13 @@ namespace atom { -NodeDebugger::NodeDebugger(node::Environment* env) : env_(env) { +NodeDebugger::NodeDebugger(node::Environment* env) + : env_(env), platform_(nullptr) { } NodeDebugger::~NodeDebugger() { - FreePlatform(platform_); + if (platform_) + FreePlatform(platform_); } void NodeDebugger::Start() {