diff --git a/src/node.cc b/src/node.cc index e1ca866f869d10..ad9184e53c8974 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3706,7 +3706,8 @@ void Init(int* argc, #endif // The const_cast doesn't violate conceptual const-ness. V8 doesn't modify // the argv array or the elements it points to. - V8::SetFlagsFromCommandLine(&v8_argc, const_cast(v8_argv), true); + if (v8_argc != 0) + V8::SetFlagsFromCommandLine(&v8_argc, const_cast(v8_argv), true); // Anything that's still in v8_argv is not a V8 or a node option. for (int i = 1; i < v8_argc; i++) {