Commit bbc42a23 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

mmdevapi: Skip device if GetId fails (Coverity).

parent fafab917
...@@ -1065,9 +1065,15 @@ static HRESULT WINAPI MMDevEnum_GetDevice(IMMDeviceEnumerator *iface, const WCHA ...@@ -1065,9 +1065,15 @@ static HRESULT WINAPI MMDevEnum_GetDevice(IMMDeviceEnumerator *iface, const WCHA
for (i = 0; i < MMDevice_count; ++i) for (i = 0; i < MMDevice_count; ++i)
{ {
HRESULT hr;
WCHAR *str; WCHAR *str;
dev = &MMDevice_head[i]->IMMDevice_iface; 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)) if (str && !lstrcmpW(str, name))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment