WASAPI: fix double unref of IMMDevice

This commit is contained in:
Andrew Kelley 2015-08-20 00:45:22 -07:00
parent 2514e19195
commit 843ea287b9

View file

@ -794,6 +794,7 @@ static int refresh_devices(SoundIoPrivate *si) {
return err; return err;
} }
IMMDevice_AddRef(rd.mm_device);
dev_w_shared->mm_device = rd.mm_device; dev_w_shared->mm_device = rd.mm_device;
dev_w_raw->mm_device = rd.mm_device; dev_w_raw->mm_device = rd.mm_device;
rd.mm_device = nullptr; rd.mm_device = nullptr;