mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 12:23:06 +02:00
GNetworkMonitorBase: don't fail when IPv6 support is unavailable
https://bugzilla.gnome.org/show_bug.cgi?id=733338
This commit is contained in:
parent
170466db26
commit
f5d1ac0d40
@ -101,8 +101,14 @@ g_network_monitor_base_constructed (GObject *object)
|
||||
g_object_unref (mask);
|
||||
|
||||
mask = g_inet_address_mask_new_from_string ("::/0", NULL);
|
||||
g_network_monitor_base_add_network (monitor, mask);
|
||||
g_object_unref (mask);
|
||||
if (mask)
|
||||
{
|
||||
/* On some environments (for example Windows without IPv6 support
|
||||
* enabled) the string "::/0" can't be processed and causes
|
||||
* g_inet_address_mask_new_from_string to return NULL */
|
||||
g_network_monitor_base_add_network (monitor, mask);
|
||||
g_object_unref (mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user