[netdev] Add check if netdev->ops is null (#7362)
This commit is contained in:
parent
fbc1d6f4fd
commit
bd1763b979
@ -389,7 +389,7 @@ void netdev_set_default(struct netdev *netdev)
|
|||||||
netdev_default = netdev;
|
netdev_default = netdev;
|
||||||
|
|
||||||
/* execture the default network interface device in the current network stack */
|
/* execture the default network interface device in the current network stack */
|
||||||
if (netdev->ops->set_default)
|
if (netdev->ops && netdev->ops->set_default)
|
||||||
{
|
{
|
||||||
netdev->ops->set_default(netdev);
|
netdev->ops->set_default(netdev);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user