mmdevapi: Skip device if GetId fails (Coverity).
Signed-off-by: André Hentschel <nerv@dawncrow.de> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fafab91751
commit
bbc42a2341
|
@ -1065,9 +1065,15 @@ static HRESULT WINAPI MMDevEnum_GetDevice(IMMDeviceEnumerator *iface, const WCHA
|
|||
|
||||
for (i = 0; i < MMDevice_count; ++i)
|
||||
{
|
||||
HRESULT hr;
|
||||
WCHAR *str;
|
||||
dev = &MMDevice_head[i]->IMMDevice_iface;
|
||||
IMMDevice_GetId(dev, &str);
|
||||
hr = IMMDevice_GetId(dev, &str);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("GetId failed: %08x\n", hr);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (str && !lstrcmpW(str, name))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue