mirror of https://github.com/PCSX2/pcsx2.git
prevent null dereference if no network device is selected in dev9
This commit is contained in:
parent
f11877e72c
commit
ad9ec44228
|
@ -171,8 +171,13 @@ s32 _DEV9open()
|
|||
//ResumeThread (handleDEV9Thread);
|
||||
NetAdapter* na=GetNetAdapter();
|
||||
if (!na)
|
||||
{
|
||||
emu_printf("Failed to GetNetAdapter()\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
InitNet(na);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ void InitNet(NetAdapter* ad)
|
|||
ResumeThread(rx_thread);
|
||||
}
|
||||
void TermNet()
|
||||
{
|
||||
if(RxRunning)
|
||||
{
|
||||
RxRunning = false;
|
||||
emu_printf("Waiting for RX-net thread to terminate..");
|
||||
|
@ -64,3 +66,4 @@ void TermNet()
|
|||
|
||||
delete nif;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue