Skip to content

Commit ec77d75

Browse files
committed
fix: null reference check
Signed-off-by: Vincent Biret <[email protected]>
1 parent 022fa5f commit ec77d75

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Microsoft.OpenApi/Models/OpenApiSchema.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ private void SerializeTypeProperty(JsonSchemaType? type, IOpenApiWriter writer,
634634
{
635635
// check whether nullable is true for upcasting purposes
636636
var isNullable = Nullable ||
637+
Extensions is not null &&
637638
Extensions.TryGetValue(OpenApiConstants.NullableExtension, out var nullExtRawValue) &&
638639
nullExtRawValue is OpenApiAny openApiAny &&
639640
openApiAny.Node is JsonNode jsonNode &&

0 commit comments

Comments
 (0)