diff options
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c index 1c1f8f7..23cef84 100644 --- a/src/service.c +++ b/src/service.c @@ -927,10 +927,10 @@ on_devices_changed (IndicatorPowerService * self) p->primary_device = indicator_power_service_choose_primary_device (p->devices); /* update the notifier's battery */ - if ((p->primary_device != NULL) || (indicator_power_device_get_kind(p->primary_device) == UP_DEVICE_KIND_BATTERY)) - indicator_power_notifier_set_battery (p->primary_device); + if ((p->primary_device != NULL) && (indicator_power_device_get_kind(p->primary_device) == UP_DEVICE_KIND_BATTERY)) + indicator_power_notifier_set_battery (p->notifier, p->primary_device); else - indicator_power_notifier_set_battery (NULL); + indicator_power_notifier_set_battery (p->notifier, NULL); /* update the battery-level action's state */ if (p->primary_device == NULL) |