WASAPI: Discovered by chance that pwstrDeviceId can be null. Treating it as a new device.

This commit is contained in:
Henrik Rydgård 2019-10-11 14:29:02 +02:00
parent 0b17dd04e6
commit cb463b569a

View file

@ -91,7 +91,8 @@ public:
return S_OK;
}
if (!wcscmp(currentDevice_, pwstrDeviceId)) {
// pwstrDeviceId can be null. We consider that a new device, I think?
if (pwstrDeviceId && !wcscmp(currentDevice_, pwstrDeviceId)) {
// Already the current device, nothing to do.
return S_OK;
}