From 484e8f07a06d28aa5f579e7f722609a9280c2def Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 23 Feb 2012 21:41:24 -0800 Subject: Watch for CLSIDFromString errors --- Alc/backends/mmdevapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 @@ -190,9 +190,10 @@ static void add_device(IMMDevice *device, DevMap *devmap) if(FAILED(hr)) 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); -- cgit v1.2.3