Skip to content

Commit 1d320b6

Browse files
Updates
1 parent 94a9f5a commit 1d320b6

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

library/PSModuleDevelopment/PSModuleDevelopment/Utility/PSObjectExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static T GetValue<T>(this PSObject PSObject, string Name)
3636
/// <returns>The values</returns>
3737
public static ArrayList GetValues(this PSObject PSObject, string Name)
3838
{
39-
if (null == PSObject.Properties[Name].Value)
39+
if (null == PSObject || null == PSObject.Properties || null == PSObject.Properties[Name].Value)
4040
return new ArrayList();
4141
PSObject value = PSObject.AsPSObject(PSObject.Properties[Name].Value);
4242
if (null == value.BaseObject)

0 commit comments

Comments
 (0)