WMI/Hardware.cs
changeset 235 99b6bab765f8
parent 234 99fad54de9f7
child 344 3145aadca3d2
     1.1 --- a/WMI/Hardware.cs	Mon Oct 18 07:15:31 2010 +0000
     1.2 +++ b/WMI/Hardware.cs	Mon Oct 18 07:18:14 2010 +0000
     1.3 @@ -54,7 +54,9 @@
     1.4        Name = hardware.Name;
     1.5        Identifier = hardware.Identifier.ToString();
     1.6        HardwareType = hardware.HardwareType.ToString();
     1.7 -      Parent = hardware.Parent.Identifier.ToString();
     1.8 +      Parent = (hardware.Parent != null)
     1.9 +        ? hardware.Parent.Identifier.ToString()
    1.10 +        : "";
    1.11      }
    1.12  
    1.13      public void Update() { }