diff --git a/src/tests/profiler/native/nongcheap/nongcheap.cpp b/src/tests/profiler/native/nongcheap/nongcheap.cpp index 67dcde1a0e561..6db85166929f8 100644 --- a/src/tests/profiler/native/nongcheap/nongcheap.cpp +++ b/src/tests/profiler/native/nongcheap/nongcheap.cpp @@ -29,6 +29,8 @@ HRESULT NonGcHeapProfiler::Initialize(IUnknown* pICorProfilerInfoUnk) HRESULT STDMETHODCALLTYPE NonGcHeapProfiler::ObjectAllocated(ObjectID objectId, ClassID classId) { + SHUTDOWNGUARD(); + COR_PRF_GC_GENERATION_RANGE gen; HRESULT hr = pCorProfilerInfo->GetObjectGeneration(objectId, &gen);