aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-23 21:41:24 -0800
committerChris Robinson <[email protected]>2012-02-23 21:41:24 -0800
commit484e8f07a06d28aa5f579e7f722609a9280c2def (patch)
tree9adbefe8609e5fabb773712f1c6847874b5c6963 /Alc
parent504cdadd60a760fd144df0d64ed9eaab2118a61d (diff)
Watch for CLSIDFromString errors
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/mmdevapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c
index f28a7906..f27f5c45 100644
--- a/Alc/backends/mmdevapi.c
+++ b/Alc/backends/mmdevapi.c
@@ -191,8 +191,9 @@ static void add_device(IMMDevice *device, DevMap *devmap)
WARN("GetValue failed: 0x%08lx\n", hr);
}
if(SUCCEEDED(hr))
+ hr = CLSIDFromString(pvguid.pwszVal, &devmap->guid);
+ if(SUCCEEDED(hr))
{
- CLSIDFromString(pvguid.pwszVal, &devmap->guid);
if((len=WideCharToMultiByte(CP_ACP, 0, pvname.pwszVal, -1, NULL, 0, NULL, NULL)) > 0)
{
devmap->name = calloc(1, len);