Fixed the NullReference Exception

This commit is contained in:
Paul Werelds 2010-10-18 07:18:14 +00:00
parent c3c27c3789
commit fcf4876985

View File

@ -54,7 +54,9 @@ namespace OpenHardwareMonitor.WMI {
Name = hardware.Name; Name = hardware.Name;
Identifier = hardware.Identifier.ToString(); Identifier = hardware.Identifier.ToString();
HardwareType = hardware.HardwareType.ToString(); HardwareType = hardware.HardwareType.ToString();
Parent = hardware.Parent.Identifier.ToString(); Parent = (hardware.Parent != null)
? hardware.Parent.Identifier.ToString()
: "";
} }
public void Update() { } public void Update() { }