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.
This commit is contained in:
Aleksander Morgado
2021-04-12 23:37:19 +02:00
parent 3d5a994ca8
commit 5a735317f7

View File

@@ -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