Skip to content
Snippets Groups Projects
Commit d5fe9c08 authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

batteryinfo: Don't carry on when we fail to initialize

parent b8fb0421
No related branches found
No related tags found
No related merge requests found
......@@ -65,12 +65,14 @@ setup_display_device (PhoshBatteryInfo *self)
if (priv->upower == NULL) {
g_warning ("Failed to connect to upowerd: %s", err->message);
g_clear_error (&err);
return;
}
/* TODO: this is a oversimplified sync call */
priv->device = up_client_get_display_device (priv->upower);
if (priv->device == NULL) {
g_warning ("Failed to get upowerd display device");
return;
}
priv->update_icon_id = g_signal_connect_swapped (priv->device,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment