Update ethernetif.c

if device->eth_rx is NULL ,rx thread will hard fault...
This commit is contained in:
Urey authored and GitHub committed 2016-09-23 17:00:31 +08:00
1 parent 6d14e1390c
commit 8979d70a69
1 file changed
+2
@@ -367,6 +367,8 @@ static void eth_rx_thread_entry(void* parameter)
/* receive all of buffer */
while (1)
{
if(device->eth_rx == RT_NULL) break;
p = device->eth_rx(&(device->parent));
if (p != RT_NULL)
{