Skip to content

Commit

Permalink
null check (#38755)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMothra authored Sep 15, 2023
1 parent e941dba commit 0a79630
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ internal static class ResourceExtensions
try
{
var exportResource = Environment.GetEnvironmentVariable(EnvironmentVariableConstants.EXPORT_RESOURCE_METRIC);
if (exportResource.Equals("true", StringComparison.OrdinalIgnoreCase))
if (exportResource != null && exportResource.Equals("true", StringComparison.OrdinalIgnoreCase))
{
shouldReportMetricTelemetry = true;
}
Expand Down

0 comments on commit 0a79630

Please sign in to comment.