aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-07-21 12:10:41 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-07-21 12:10:41 -0500
commit7b3b8a27aa6e0a9a10f6faec1cd13b10f5b2492a (patch)
treeeb27599c6142fbba202e4c2dcb7b8c91d8838c92 /src/service.c
parentbc32a96ee2d776eb2cf1af6e67f940afad589dce (diff)
downloadayatana-indicator-power-7b3b8a27aa6e0a9a10f6faec1cd13b10f5b2492a.tar.gz
ayatana-indicator-power-7b3b8a27aa6e0a9a10f6faec1cd13b10f5b2492a.tar.bz2
ayatana-indicator-power-7b3b8a27aa6e0a9a10f6faec1cd13b10f5b2492a.zip
fix build issues
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c6
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)