Hardware/LPC/W83627DHG.cs
changeset 15 0e812fe67bac
parent 14 51c2f209da6d
child 19 890e8fca7f33
     1.1 --- a/Hardware/LPC/W83627DHG.cs	Sun Jan 31 20:57:18 2010 +0000
     1.2 +++ b/Hardware/LPC/W83627DHG.cs	Sun Jan 31 22:00:31 2010 +0000
     1.3 @@ -239,14 +239,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