mirror of https://github.com/PCSX2/pcsx2.git
SPU2: fix nullptr crash on DSound
This commit is contained in:
parent
444f5ed515
commit
c8abed371b
|
@ -417,7 +417,6 @@ public:
|
||||||
MessageBox((HWND)parent, L"Error Opening the config dialog.", L"OMG ERROR!", MB_OK | MB_SETFOREGROUND);
|
MessageBox((HWND)parent, L"Error Opening the config dialog.", L"OMG ERROR!", MB_OK | MB_SETFOREGROUND);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Test() const
|
s32 Test() const
|
||||||
|
@ -428,6 +427,8 @@ public:
|
||||||
int GetEmptySampleCount()
|
int GetEmptySampleCount()
|
||||||
{
|
{
|
||||||
DWORD play, write;
|
DWORD play, write;
|
||||||
|
if (buffer == nullptr)
|
||||||
|
return 0;
|
||||||
buffer->GetCurrentPosition(&play, &write);
|
buffer->GetCurrentPosition(&play, &write);
|
||||||
|
|
||||||
// Note: Dsound's write cursor is bogus. Use our own instead:
|
// Note: Dsound's write cursor is bogus. Use our own instead:
|
||||||
|
|
Loading…
Reference in New Issue