Skip to content

Commit

Permalink
Merge pull request #1104 from quanterion/patch-1
Browse files Browse the repository at this point in the history
Fix check Extensions object for null to avoid null reference exception
  • Loading branch information
baywet authored Dec 9, 2022
2 parents 1a7392f + 48a809e commit ebbe5c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Services/OpenApiWalker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ internal void Walk(IOpenApiExtensible openApiExtensible)

_visitor.Visit(openApiExtensible);

if (openApiExtensible != null)
if (openApiExtensible.Extensions != null)
{
foreach (var item in openApiExtensible.Extensions)
{
Expand Down

0 comments on commit ebbe5c1

Please sign in to comment.