mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
Fixed crash if the WASAPI audio device couldn't be recovered
This commit is contained in:
parent
4a734209a3
commit
77ca0f273c
1 changed files with 2 additions and 1 deletions
|
|
@ -372,7 +372,8 @@ WASAPI_GetPendingBytes(_THIS)
|
|||
UINT32 frames = 0;
|
||||
|
||||
/* it's okay to fail here; we'll deal with failures in the audio thread. */
|
||||
if (FAILED(IAudioClient_GetCurrentPadding(this->hidden->client, &frames))) {
|
||||
/* FIXME: need a lock around checking this->hidden->client */
|
||||
if (!this->hidden->client || FAILED(IAudioClient_GetCurrentPadding(this->hidden->client, &frames))) {
|
||||
return 0; /* oh well. */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue