Fix crash on Windows 8.x
This commit is contained in:
parent
856a2b0ebe
commit
d9b8e829a5
@ -38,7 +38,7 @@ static inline HRESULT XAudio2Create(IXAudio2 **ppXAudio2,
|
|||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
*ppXAudio2 = pXAudio2;
|
*ppXAudio2 = pXAudio2;
|
||||||
}
|
}
|
||||||
else {
|
else if (pXAudio2) {
|
||||||
pXAudio2->lpVtbl->Release(pXAudio2);
|
pXAudio2->lpVtbl->Release(pXAudio2);
|
||||||
}
|
}
|
||||||
return hr;
|
return hr;
|
||||||
|
Loading…
Reference in New Issue
Block a user