Commit c1fa659b authored by Landry Breuil's avatar Landry Breuil Committed by Simon Steinbeiß

Don't crash when upowerd isnt present (bug #60)

parent 615f57f4
Pipeline #843 passed with stages
in 3 minutes and 12 seconds
......@@ -100,6 +100,13 @@ static void
xfce_displays_upower_init (XfceDisplaysUPower *upower)
{
upower->client = up_client_new ();
if (!UP_IS_CLIENT (upower->client))
{
upower->handler = 0;
upower->lid_is_closed = 0;
return;
}
upower->lid_is_closed = up_client_get_lid_is_closed (upower->client);
#if UP_CHECK_VERSION(0, 99, 0)
upower->handler = g_signal_connect (G_OBJECT (upower->client),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment