File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
profiler/src/ProfilerEngine/Datadog.Profiler.Native Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,26 @@ void CorProfilerCallback::SetStackSamplerEnabled(bool enabled)
8989
9090void CorProfilerCallback::SetAllocationTrackingEnabled (bool enabled)
9191{
92- _pClrEventsParser->SetAllocationTrackingEnabled (enabled);
92+ if (_pClrEventsParser)
93+ {
94+ _pClrEventsParser->SetAllocationTrackingEnabled (enabled);
95+ }
96+ else
97+ {
98+ Log::Debug (" SetAllocationTrackingEnabled: trying to enable/disable while it was not configured" );
99+ }
93100}
94101
95102void CorProfilerCallback::SetContentionTrackingEnabled (bool enabled)
96103{
97- _pClrEventsParser->SetContentionTrackingEnabled (enabled);
104+ if (_pClrEventsParser)
105+ {
106+ _pClrEventsParser->SetContentionTrackingEnabled (enabled);
107+ }
108+ else
109+ {
110+ Log::Debug (" SetContentionTrackingEnabled: trying to enable/disable while it was not configured" );
111+ }
98112}
99113
100114void CorProfilerCallback::SetExceptionTrackingEnabled (bool enabled)
You can’t perform that action at this time.
0 commit comments