Fix a nullptr dereference in EmuDirectSoundBuffer8_Stop

Eggo Mania no longer crashes, but instad shows a 'disc is dirty or damaged' screen
This commit is contained in:
Luke Usher 2016-12-12 20:42:03 +00:00
parent 90d2a34090
commit 1f5f4f3ad0
1 changed files with 5 additions and 3 deletions

View File

@ -1444,10 +1444,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Stop
");\n",
GetCurrentThreadId(), pThis);
HRESULT hRet = pThis->EmuDirectSoundBuffer8->Stop();
HRESULT hRet = D3D_OK;
if (pThis != nullptr) {
hRet = pThis->EmuDirectSoundBuffer8->Stop();
}
return hRet;
}