mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 18:10:08 +01:00
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:
parent
0225c4567b
commit
2b4b9d34e4
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue