mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 12:20:12 +01:00
core/setting: don't assume we have a connection when synthesizing a property
nm_setting_to_string() operates on the setting alone, without a connection. Tolerate that. This fixed nm_connection_dump(vlan_connection).
This commit is contained in:
parent
acbeda57fc
commit
c39b134da1
1 changed files with 5 additions and 1 deletions
|
|
@ -2037,8 +2037,12 @@ _nm_setting_get_deprecated_virtual_interface_name (NMSetting *setting,
|
|||
{
|
||||
NMSettingConnection *s_con;
|
||||
|
||||
if (!connection)
|
||||
return NULL;
|
||||
|
||||
s_con = nm_connection_get_setting_connection (connection);
|
||||
g_return_val_if_fail (s_con != NULL, NULL);
|
||||
if (!s_con)
|
||||
return NULL;
|
||||
|
||||
if (nm_setting_connection_get_interface_name (s_con))
|
||||
return g_variant_new_string (nm_setting_connection_get_interface_name (s_con));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue