mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-17 13:50:41 +02:00
wwan: fix wrong assert in deactivate_cleanup()
When the modem device is abruptly disconnected,
nm_modem_device_state_changed() calls deactivate_cleanup() with a NULL
device argument and that's perfectly fine.
We should only check the instance type if we know the device is non-NULL.
(NetworkManager:9166): NetworkManager-wwan-CRITICAL **: deactivate_cleanup: assertion 'NM_IS_DEVICE ( failed
(cherry picked from commit 41c87eb363)
This commit is contained in:
parent
6f2e6071bc
commit
762f55ce93
1 changed files with 2 additions and 1 deletions
|
|
@ -847,7 +847,6 @@ deactivate_cleanup (NMModem *self, NMDevice *device)
|
|||
int ifindex;
|
||||
|
||||
g_return_if_fail (NM_IS_MODEM (self));
|
||||
g_return_if_fail (NM_IS_DEVICE (device));
|
||||
|
||||
priv = NM_MODEM_GET_PRIVATE (self);
|
||||
|
||||
|
|
@ -867,6 +866,8 @@ deactivate_cleanup (NMModem *self, NMDevice *device)
|
|||
}
|
||||
|
||||
if (device) {
|
||||
g_return_if_fail (NM_IS_DEVICE (device));
|
||||
|
||||
if (priv->ip4_method == NM_MODEM_IP_METHOD_STATIC ||
|
||||
priv->ip4_method == NM_MODEM_IP_METHOD_AUTO ||
|
||||
priv->ip6_method == NM_MODEM_IP_METHOD_STATIC ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue