uLipSync
uLipSync copied to clipboard
Prevent crash when _rawInputData is not created
Our app saw repeated bad memory access crashes that occurred when accessing _rawInputData. When we investigated, we saw that _rawInputData is usually referenced within the lock (_lockObject), but was not in the OnDataReceived method.
This PR moves access of _rawInputData to within the lock (_lockObject), and guards that the array represents valid memory before accessing data within it. Adopting this change locally fixed our crash.