Skip to content

Commit

Permalink
Modified assertion to avoid NULL monoBuffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrykos committed Sep 20, 2024
1 parent 3822470 commit ef7302e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hostapi/wasapi/pa_win_wasapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,7 @@ static HRESULT ReallocateMonoMixerBuffer(PaWasapiSubStream *subStream, UINT32 fr
frames = subStream->bufferSize;

assert(frames != 0);
assert(subStream->wavexu.ext.Format.nBlockAlign != 0);

// Expand buffer if necessary
UINT32 monoBufferSize = frames * subStream->wavexu.ext.Format.nBlockAlign;
Expand All @@ -1444,8 +1445,6 @@ static HRESULT ReallocateMonoMixerBuffer(PaWasapiSubStream *subStream, UINT32 fr
subStream->monoBufferSize = monoBufferSize;
}

assert(subStream->monoBuffer != NULL);

return S_OK;
}

Expand Down

0 comments on commit ef7302e

Please sign in to comment.