win-wasapi: Fix potential null pointer deref in enumeration
This commit is contained in:
parent
847b3013fc
commit
b5581938ca
@ -20,7 +20,7 @@ string GetDeviceName(IMMDevice *device)
|
||||
PropVariantInit(&nameVar);
|
||||
res = store->GetValue(PKEY_Device_FriendlyName, &nameVar);
|
||||
|
||||
if (SUCCEEDED(res)) {
|
||||
if (SUCCEEDED(res) && nameVar.pwszVal && *nameVar.pwszVal) {
|
||||
size_t len = wcslen(nameVar.pwszVal);
|
||||
size_t size;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user