Skip to content

Commit

Permalink
Fix warning with generated converter code (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Jul 18, 2023
1 parent a42708b commit 5b5415b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/plugins/dotnet/dotnet_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def generate_type_alias_converter(
]
for t in subset_types:
code += [
f"if (orType.Value.GetType() == typeof({t}))",
f"if (orType.Value?.GetType() == typeof({t}))",
"{",
f"return new {type_def.name}(({t})orType.Value);",
"}",
Expand Down

0 comments on commit 5b5415b

Please sign in to comment.