mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 17:50:16 +01:00
core: fix crash after wake due to 8f4d4c0463
Need to check if the killswitch type has an object filter function before trying to use it.
This commit is contained in:
parent
f9318dac55
commit
644dabd7ab
1 changed files with 4 additions and 2 deletions
|
|
@ -2674,8 +2674,10 @@ impl_manager_sleep (NMManager *self, gboolean sleep, GError **error)
|
|||
RadioState *rstate = &priv->radio_states[i];
|
||||
gboolean enabled = (rstate->hw_enabled && rstate->enabled);
|
||||
|
||||
if (rstate->object_filter_func (G_OBJECT (iter->data)))
|
||||
nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (iter->data), enabled);
|
||||
if ( rstate->object_filter_func
|
||||
&& rstate->object_filter_func (G_OBJECT (device))) {
|
||||
nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (device), enabled);
|
||||
}
|
||||
}
|
||||
|
||||
nm_device_clear_autoconnect_inhibit (device);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue