Protect against nullptr dereference in SetConeOrientation
This commit is contained in:
parent
1c4d0f2558
commit
be40f6c4c1
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue