diff options
author | monsta <monsta@inbox.ru> | 2015-03-04 15:15:51 +0300 |
---|---|---|
committer | Stefano Karapetsas <stefano@karapetsas.com> | 2015-03-19 09:25:12 +0100 |
commit | 50439c50f0ae2c3d51375e17f403996d1a9cdab9 (patch) | |
tree | ab03b634768966067263ad15c1bc59ed47d1b9cb | |
parent | 0ada40a2c46c5da5d9dd68c7a274c286ab9b7baf (diff) | |
download | mate-power-manager-50439c50f0ae2c3d51375e17f403996d1a9cdab9.tar.bz2 mate-power-manager-50439c50f0ae2c3d51375e17f403996d1a9cdab9.tar.xz |
upower: handle UP_DEVICE_STATE_UNKNOWN, avoid assert
Closes https://github.com/mate-desktop/mate-power-manager/pull/130
-rw-r--r-- | src/gpm-upower.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpm-upower.c b/src/gpm-upower.c index 744eae4..82d12e9 100644 --- a/src/gpm-upower.c +++ b/src/gpm-upower.c @@ -648,6 +648,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; |