mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 09:58:07 +02:00
core: lack of an IPv4 setting indicates DHCP (novell #664640)
It shouldn't assert.
This commit is contained in:
parent
5a35862a1d
commit
1187922adf
1 changed files with 3 additions and 4 deletions
|
|
@ -3355,7 +3355,7 @@ dispose (GObject *object)
|
|||
if ( nm_device_interface_can_assume_connections (NM_DEVICE_INTERFACE (self))
|
||||
&& (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED)) {
|
||||
NMConnection *connection;
|
||||
NMSettingIP4Config *s_ip4;
|
||||
NMSettingIP4Config *s_ip4 = NULL;
|
||||
const char *method = NULL;
|
||||
|
||||
/* Only system connections can be left up */
|
||||
|
|
@ -3368,9 +3368,8 @@ dispose (GObject *object)
|
|||
* to check that.
|
||||
*/
|
||||
s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
|
||||
g_assert (s_ip4);
|
||||
|
||||
method = nm_setting_ip4_config_get_method (s_ip4);
|
||||
if (s_ip4)
|
||||
method = nm_setting_ip4_config_get_method (s_ip4);
|
||||
if ( !method
|
||||
|| !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)
|
||||
|| !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue