Fix crash on Windows 8.x

This commit is contained in:
Lior Halphon 2022-07-08 14:17:28 +03:00
parent 856a2b0ebe
commit d9b8e829a5

View File

@ -38,7 +38,7 @@ static inline HRESULT XAudio2Create(IXAudio2 **ppXAudio2,
if (SUCCEEDED(hr)) {
*ppXAudio2 = pXAudio2;
}
else {
else if (pXAudio2) {
pXAudio2->lpVtbl->Release(pXAudio2);
}
return hr;
@ -132,4 +132,4 @@ static bool _audio_init(void)
return true;
}
GB_AUDIO_DRIVER(XAudio2_7);
GB_AUDIO_DRIVER(XAudio2_7);