From 2b4b9d34e4df4ea18d8ac36d32db74af2bb85e82 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 19 May 2016 10:08:47 +0200 Subject: [PATCH] clients: don't assert against existance of plugin in nm_vpn_supports_ipv6() Obviously, loading a plugin can fail easily. --- clients/common/nm-vpn-helpers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c index 086272c424..a9166ca5ba 100644 --- a/clients/common/nm-vpn-helpers.c +++ b/clients/common/nm-vpn-helpers.c @@ -83,10 +83,12 @@ nm_vpn_supports_ipv6 (NMConnection *connection) g_return_val_if_fail (s_vpn != NULL, FALSE); service_type = nm_setting_vpn_get_service_type (s_vpn); - g_return_val_if_fail (service_type != NULL, FALSE); + if (!service_type) + return FALSE; plugin = nm_vpn_lookup_plugin (NULL, service_type, NULL); - g_return_val_if_fail (plugin != NULL, FALSE); + if (!plugin) + return FALSE; capabilities = nm_vpn_editor_plugin_get_capabilities (plugin); return NM_FLAGS_HAS (capabilities, NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6);