From 47af548872ce7dc6ec594eb5c21add531cff475a Mon Sep 17 00:00:00 2001 From: LastExceed Date: Tue, 6 Oct 2026 07:22:44 +0200 Subject: [PATCH] add missing RAII guard for device id --- src/host/wasapi/device.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/host/wasapi/device.rs b/src/host/wasapi/device.rs index 0d73be057..85290fe85 100644 --- a/src/host/wasapi/device.rs +++ b/src/host/wasapi/device.rs @@ -505,8 +505,8 @@ impl Device { Error::with_message(ErrorKind::DeviceNotAvailable, "Default device not found") })?; unsafe { - match device.GetId() { - Ok(pwstr) => match pwstr.to_string() { + match device.GetId().map(ComString) { + Ok(pwstr) => match pwstr.0.to_string() { Ok(id_str) => Ok(DeviceId::new(crate::platform::HostId::Wasapi, id_str)), Err(e) => Err(Error::with_message( ErrorKind::BackendError,