Skip to content

Commit

Permalink
prevent another null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
rgl committed Jul 12, 2024
1 parent c024b04 commit a9db6ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update/windows-update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ for ($i = 0; $i -lt $searchResult.Updates.Count; ++$i) {
$properties = $update `
| Get-Member $expectedProperties `
| Select-Object -ExpandProperty Name
if (Compare-Object $expectedProperties $properties) {
if (!$properties -or (Compare-Object $expectedProperties $properties)) {
throw "the windows update api returned a invalid update object. see https://github.com/rgl/packer-plugin-windows-update/issues/144."
}

Expand Down

0 comments on commit a9db6ec

Please sign in to comment.