Hardware/HDD/HDD.cs
changeset 166 fa9dfbfc4145
parent 165 813d8bc3192f
child 167 b7cc9d09aefe
     1.1 --- a/Hardware/HDD/HDD.cs	Sun Aug 08 13:57:26 2010 +0000
     1.2 +++ b/Hardware/HDD/HDD.cs	Thu Aug 12 20:53:27 2010 +0000
     1.3 @@ -37,6 +37,7 @@
     1.4  
     1.5  using System;
     1.6  using System.Collections.Generic;
     1.7 +using System.Globalization;
     1.8  
     1.9  namespace OpenHardwareMonitor.Hardware.HDD {
    1.10    internal class HDD : IHardware {
    1.11 @@ -70,7 +71,10 @@
    1.12      }
    1.13  
    1.14      public Identifier Identifier {
    1.15 -      get { return new Identifier("hdd", drive.ToString()); }
    1.16 +      get { 
    1.17 +        return new Identifier("hdd", 
    1.18 +          drive.ToString(CultureInfo.InvariantCulture)); 
    1.19 +      }
    1.20      }
    1.21  
    1.22      public HardwareType HardwareType {
    1.23 @@ -113,7 +117,8 @@
    1.24      #pragma warning restore 67    
    1.25  
    1.26      public void Accept(IVisitor visitor) {
    1.27 -      visitor.VisitHardware(this);
    1.28 +      if (visitor != null)
    1.29 +        visitor.VisitHardware(this);
    1.30      }
    1.31  
    1.32      public void Traverse(IVisitor visitor) { }