mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 14:06:15 +01:00
Merge branch 'mcatanzaro/#2020' into 'master'
Fix crash caused by g_network_monitor_base_add_network() Closes #2020 See merge request GNOME/glib!1343
This commit is contained in:
commit
5941bfa49c
@ -496,11 +496,9 @@ void
|
||||
g_network_monitor_base_add_network (GNetworkMonitorBase *monitor,
|
||||
GInetAddressMask *network)
|
||||
{
|
||||
if (!g_hash_table_add (monitor->priv->networks, network))
|
||||
if (!g_hash_table_add (monitor->priv->networks, g_object_ref (network)))
|
||||
return;
|
||||
|
||||
g_object_ref (network); /* for the element now stored in the hash table */
|
||||
|
||||
if (g_inet_address_mask_get_length (network) == 0)
|
||||
{
|
||||
switch (g_inet_address_mask_get_family (network))
|
||||
|
Loading…
Reference in New Issue
Block a user