netdev2_tap: check for existence before calling cb
This commit is contained in:
parent
5f6cc67c23
commit
900528b2f2
@ -296,7 +296,9 @@ static int _send(netdev2_t *netdev, const struct iovec *vector, int n)
|
|||||||
}
|
}
|
||||||
netdev->stats.tx_bytes += bytes;
|
netdev->stats.tx_bytes += bytes;
|
||||||
#endif
|
#endif
|
||||||
netdev->event_callback(netdev, NETDEV2_EVENT_TX_COMPLETE, NULL);
|
if (netdev->event_callback) {
|
||||||
|
netdev->event_callback(netdev, NETDEV2_EVENT_TX_COMPLETE, NULL);
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user