From 1ff03849f9c02ba96b5dc7cedba8644cc1b06046 Mon Sep 17 00:00:00 2001 From: John Brooks Date: Thu, 12 Dec 2013 15:46:27 -0700 Subject: [PATCH] Prevent assert for offline accounts with power saving --- src/mcd-connection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mcd-connection.c b/src/mcd-connection.c index 93b81d5..df35b4b 100644 --- a/src/mcd-connection.c +++ b/src/mcd-connection.c @@ -1678,10 +1678,10 @@ on_inactivity_changed (McdSlacker *slacker, McdConnection *self) { McdConnectionPrivate *priv = self->priv; - DEBUG ("%sactive, %s have power saving iface.", inactive ? "in" : "", - priv->has_power_saving_if ? "has" : "doesn't"); + DEBUG ("%sactive, connection %s have power saving iface.", inactive ? "in" : "", + priv->has_power_saving_if ? "does" : "doesn't"); - if (priv->has_power_saving_if) + if (priv->tp_conn != NULL && priv->has_power_saving_if) tp_cli_connection_interface_power_saving_call_set_power_saving (priv->tp_conn, -1, inactive, NULL, NULL, NULL, NULL); } -- 1.8.3.1