diff --git a/src/node_win32_perfctr_provider.cc b/src/node_win32_perfctr_provider.cc index 8135726852b..903150ed61b 100644 --- a/src/node_win32_perfctr_provider.cc +++ b/src/node_win32_perfctr_provider.cc @@ -172,6 +172,13 @@ void InitPerfCountersWin32() { ZeroMemory(&providerContext, sizeof(providerContext)); providerContext.ContextSize = sizeof(providerContext); + if (!perfctr_startProvider || + !perfctr_setCounterSetInfo || + !perfctr_createInstance) { + NodeCounterProvider = NULL; + return; + } + status = perfctr_startProvider(&NodeCounterSetGuid, &providerContext, &NodeCounterProvider);