clients: don't assert against existance of plugin in nm_vpn_supports_ipv6()

Obviously, loading a plugin can fail easily.
This commit is contained in:
Thomas Haller 2016-05-19 10:08:47 +02:00
parent 0225c4567b
commit 2b4b9d34e4

View file

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