diff options
Diffstat (limited to 'src/device-provider.c')
-rw-r--r-- | src/device-provider.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/device-provider.c b/src/device-provider.c index 05c6cd0..5ccf588 100644 --- a/src/device-provider.c +++ b/src/device-provider.c @@ -62,9 +62,18 @@ indicator_power_device_provider_default_init (IndicatorPowerDeviceProviderInterf GList * indicator_power_device_provider_get_devices (IndicatorPowerDeviceProvider * self) { + GList * devices; + IndicatorPowerDeviceProviderInterface * iface; + g_return_val_if_fail (INDICATOR_IS_POWER_DEVICE_PROVIDER (self), NULL); + iface = INDICATOR_POWER_DEVICE_PROVIDER_GET_INTERFACE (self); + + if (iface->get_devices != NULL) + devices = iface->get_devices (self); + else + devices = NULL; - return INDICATOR_POWER_DEVICE_PROVIDER_GET_INTERFACE (self)->get_devices (self); + return devices; } /** |