Skip to content

Commit

Permalink
upower: handle UP_DEVICE_STATE_UNKNOWN, avoid assert
Browse files Browse the repository at this point in the history
Closes #130
  • Loading branch information
monsta authored and stefano-k committed Mar 19, 2015
1 parent 1e1dd55 commit d637b7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gpm-upower.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d637b7e

Please sign in to comment.