Commit 1187922a authored by Dan Williams's avatar Dan Williams

core: lack of an IPv4 setting indicates DHCP (novell #664640)

It shouldn't assert.
parent 5a35862a
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment