Fix UB when there are no audio devices
When there are no capture nor playback devices, pContext->pDeviceInfos is NULL and pContext->playbackDeviceInfoCount is 0. Unfortunately, any arithmetic on NULL is UB, including trivial +0, which triggers UB sanitizer. This can lead to crashes, for example when compiling with Zig, which enables UBsan by default.
Showing
Please register or sign in to comment