diff options
author | monsta <[email protected]> | 2017-01-07 20:43:46 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-01-24 12:04:36 +0300 |
commit | b850b99bcdb120b89b354280f2816587ea6b7611 (patch) | |
tree | f9e7617b709921c226c2740b79bb6f5a278ab189 | |
parent | a1de9e1967d4be7d90d2bf8ce752283e2dc062af (diff) | |
download | mate-power-manager-b850b99bcdb120b89b354280f2816587ea6b7611.tar.bz2 mate-power-manager-b850b99bcdb120b89b354280f2816587ea6b7611.tar.xz |
statistics: don't call upower function on a NULL device path
fixes https://github.com/mate-desktop/mate-power-manager/issues/139
-rw-r--r-- | src/gpm-statistics.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c index 21a0a52..b71a6f8 100644 --- a/src/gpm-statistics.c +++ b/src/gpm-statistics.c @@ -1131,6 +1131,10 @@ static void gpm_stats_button_update_ui (void) { UpDevice *device; + + if (current_device == NULL) + return; + device = up_device_new (); up_device_set_object_path_sync (device, current_device, NULL, NULL); gpm_stats_update_info_data (device); |