Skip to content

Commit 4adfc5d

Browse files
Copilotazchohfi
andcommitted
Fix null safety issue in VerifyManifestAssetReferences
Co-authored-by: azchohfi <[email protected]>
1 parent dd9da5e commit 4adfc5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/winapp-CLI/WinApp.Cli/Commands/ManifestUpdateAssetsCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ private void VerifyManifestAssetReferences(FileInfo manifestPath)
108108
hasAssetReferences = true;
109109
}
110110

111-
if (visualElementsNode != null)
111+
if (visualElementsNode?.Attributes != null)
112112
{
113-
foreach (XmlAttribute attr in visualElementsNode.Attributes!)
113+
foreach (XmlAttribute attr in visualElementsNode.Attributes)
114114
{
115115
if (attr.Value.Contains("Assets", StringComparison.OrdinalIgnoreCase))
116116
{

0 commit comments

Comments
 (0)