Hardware/LPC/IT87.cs
changeset 15 0e812fe67bac
parent 13 d32fc5f2e822
     1.1 --- a/Hardware/LPC/IT87.cs	Sun Jan 31 20:57:18 2010 +0000
     1.2 +++ b/Hardware/LPC/IT87.cs	Sun Jan 31 22:00:31 2010 +0000
     1.3 @@ -205,14 +205,16 @@
     1.4      private void ActivateSensor(Sensor sensor) {
     1.5        if (!active.Contains(sensor)) {
     1.6          active.Add(sensor);
     1.7 -        SensorAdded(sensor);
     1.8 +        if (SensorAdded != null)
     1.9 +          SensorAdded(sensor);
    1.10        }
    1.11      }
    1.12  
    1.13      private void DeactivateSensor(Sensor sensor) {
    1.14        if (active.Contains(sensor)) {
    1.15          active.Remove(sensor);
    1.16 -        SensorRemoved(sensor);
    1.17 +        if (SensorRemoved != null)
    1.18 +          SensorRemoved(sensor);
    1.19        }
    1.20      }
    1.21