netdev2_tap: check for existence before calling cb

This commit is contained in:
Oleg Hahm 2016-04-03 18:04:03 +02:00
parent 5f6cc67c23
commit 900528b2f2

View File

@ -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;
} }