Skip to content

Commit

Permalink
Add IsSet check before calling AsString() (#71756)
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason committed Jul 7, 2022
1 parent f95d9ba commit 29fcb7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,11 @@ ds_rt_server_log_pause_message (void)

const char diagPortsName[] = "DOTNET_DiagnosticPorts";
CLRConfigNoCache diagPorts = CLRConfigNoCache::Get(diagPortsName);
LPCSTR ports = diagPorts.AsString();
LPCSTR ports = nullptr;
if (diagPorts.IsSet())
{
ports = diagPorts.AsString();
}

uint32_t port_suspended = ds_rt_config_value_get_default_port_suspend();

Expand Down

0 comments on commit 29fcb7f

Please sign in to comment.