Protect against nullptr dereference in SetConeOrientation

This commit is contained in:
Luke Usher 2017-10-02 22:02:44 +01:00 committed by RadWolfie
parent 1c4d0f2558
commit be40f6c4c1
1 changed files with 4 additions and 1 deletions

View File

@ -816,7 +816,10 @@ inline HRESULT HybridDirectSound3DBuffer_SetConeOrientation(
enterCriticalSection;
HRESULT hRet = pDS3DBuffer->SetConeOrientation(x, y, z, dwApply);
HRESULT hRet = DS_OK;
if (pDS3DBuffer != nullptr) {
hRet = pDS3DBuffer->SetConeOrientation(x, y, z, dwApply);
}
leaveCriticalSection;