summaryrefslogtreecommitdiff
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:44:52 +0200
commit08c3de0b285e062f722f8152f8a7cbdbce71b70f (patch)
tree84639da53f5cca35d1c1cd901076675d5d3176d6
parent91b399cd4337aa2c8d97899983cf2c4729b27509 (diff)
cli: avoid attempting to setup timeout on NULL proxymm-1-14
mm_manager_get_proxy() may actually return NULL if creating the internal GDBusProxy for the Manager interface fails. (cherry picked from commit 5a735317f7c0c42b2ddce52dbf1fa1edfc1c41f4)
-rw-r--r--cli/mmcli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/mmcli.c b/cli/mmcli.c
index bf59867c..e4745f25 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