mirror of
https://github.com/holub/mame
synced 2025-06-27 22:54:42 +03:00
Fix crashiness on OS X when the network device couldn't be opened (nw)
This commit is contained in:
parent
d946cc802e
commit
f1c9b0a8f5
@ -217,6 +217,9 @@ int netdev_pcap::recv_dev(uint8_t **buf)
|
|||||||
uint8_t pktbuf[2048];
|
uint8_t pktbuf[2048];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
// no device open?
|
||||||
|
if(!m_p) return 0;
|
||||||
|
|
||||||
// Empty
|
// Empty
|
||||||
if(OSAtomicCompareAndSwapInt(m_ctx.head, m_ctx.tail, &m_ctx.tail)) {
|
if(OSAtomicCompareAndSwapInt(m_ctx.head, m_ctx.tail, &m_ctx.tail)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user