From 5a735317f7c0c42b2ddce52dbf1fa1edfc1c41f4 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 12 Apr 2021 23:37:19 +0200 Subject: 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. --- cli/mmcli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3