aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-04-12 23:37:19 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-04-12 23:39:35 +0200
commit5a735317f7c0c42b2ddce52dbf1fa1edfc1c41f4 (patch)
treee28bf9358fd513e77b9d748f44b8713d06952621
parent3d5a994ca8d8e766fd87a85d346c5b21f5e6c53e (diff)
cli: avoid attempting to setup timeout on NULL proxy
mm_manager_get_proxy() may actually return NULL if creating the internal GDBusProxy for the Manager interface fails.
-rw-r--r--cli/mmcli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/mmcli.c b/cli/mmcli.c
index 3343a6c8..76e630b0 100644
--- a/cli/mmcli.c
+++ b/cli/mmcli.c
@@ -188,7 +188,8 @@ mmcli_force_sync_operation (void)
void
mmcli_force_operation_timeout (GDBusProxy *proxy)
{
- g_dbus_proxy_set_default_timeout (proxy, timeout * 1000);
+ if (proxy)
+ g_dbus_proxy_set_default_timeout (proxy, timeout * 1000);
}
gint