From d637b7ec0cf045c957105b22607e57401f6074b6 Mon Sep 17 00:00:00 2001 From: monsta Date: Wed, 4 Mar 2015 15:15:51 +0300 Subject: upower: handle UP_DEVICE_STATE_UNKNOWN, avoid assert Closes https://github.com/mate-desktop/mate-power-manager/pull/130 --- src/gpm-upower.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gpm-upower.c b/src/gpm-upower.c index f659c51..5deb1f7 100644 --- a/src/gpm-upower.c +++ b/src/gpm-upower.c @@ -652,6 +652,10 @@ gpm_device_state_to_localised_string (UpDeviceState state) /* TRANSLATORS: battery state */ state_string = _("Waiting to discharge"); break; + case UP_DEVICE_STATE_UNKNOWN: + /* TRANSLATORS: battery state */ + state_string = _("Unknown state"); + break; default: g_assert_not_reached (); break; -- cgit v1.2.1