diff options
author | monsta <[email protected]> | 2015-03-04 15:15:51 +0300 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2015-03-19 09:26:20 +0100 |
commit | d637b7ec0cf045c957105b22607e57401f6074b6 (patch) | |
tree | ca9b8e3e3f6e2f665ab82576fc5030818ba0f816 /src | |
parent | 1e1dd554dc79cf732447d7c720302f9a8e5e1d2b (diff) | |
download | mate-power-manager-d637b7ec0cf045c957105b22607e57401f6074b6.tar.bz2 mate-power-manager-d637b7ec0cf045c957105b22607e57401f6074b6.tar.xz |
upower: handle UP_DEVICE_STATE_UNKNOWN, avoid assert
Closes https://github.com/mate-desktop/mate-power-manager/pull/130
Diffstat (limited to 'src')
-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 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; |