From 843ea287b9f66a9cdf75edc0495dc98a85dc773b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 20 Aug 2015 00:45:22 -0700 Subject: [PATCH] WASAPI: fix double unref of IMMDevice --- src/wasapi.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wasapi.cpp b/src/wasapi.cpp index 914d896..dbc28ff 100644 --- a/src/wasapi.cpp +++ b/src/wasapi.cpp @@ -794,6 +794,7 @@ static int refresh_devices(SoundIoPrivate *si) { return err; } + IMMDevice_AddRef(rd.mm_device); dev_w_shared->mm_device = rd.mm_device; dev_w_raw->mm_device = rd.mm_device; rd.mm_device = nullptr;