From 5b17593fb388ab9febc2e4bc26d8054a34dd58c0 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 1 Jun 2012 13:43:40 -0500 Subject: Fix edge case in indicator_power_device_get_icon_names() that returned a bad value if the caller passed in a NULL pointer as a device. Added regression test. --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/device.c b/src/device.c index ac03009..b163682 100644 --- a/src/device.c +++ b/src/device.c @@ -307,7 +307,7 @@ indicator_power_device_get_icon_names (const IndicatorPowerDevice * device) const gchar *index_str; /* LCOV_EXCL_START */ - g_return_val_if_fail (INDICATOR_IS_POWER_DEVICE(device), UP_DEVICE_KIND_UNKNOWN); + g_return_val_if_fail (INDICATOR_IS_POWER_DEVICE(device), NULL); /* LCOV_EXCL_STOP */ gdouble percentage = indicator_power_device_get_percentage (device); -- cgit v1.2.3