Fix Windows build crashing because virtual_mic is Option Device not just Device (not inside let Some)

This commit is contained in:
csd4ni3l
2026-02-17 19:30:02 +01:00
parent 9d3d027e45
commit 8d036bca08

View File

@@ -60,18 +60,6 @@ pub fn create_virtual_mic_windows() -> (OutputStream, OutputStream) {
});
if let Some(virtual_mic) = virtual_mic {
// nothing, let Some doesnt support !
}
else {
MessageDialog::new()
.set_title("VB Cable Driver not installed.")
.set_description("Could not access VB Cable output device. Is VB Cable Driver installed?")
.set_buttons(MessageButtons::Ok)
.show();
std::process::exit(1);
}
route_standard_to_virtual(&host, &virtual_mic);
let normal_output = host
@@ -89,3 +77,13 @@ pub fn create_virtual_mic_windows() -> (OutputStream, OutputStream) {
.expect("Failed to open stream"),
);
}
else {
MessageDialog::new()
.set_title("VB Cable Driver not installed.")
.set_description("Could not access VB Cable output device. Is VB Cable Driver installed?")
.set_buttons(MessageButtons::Ok)
.show();
std::process::exit(1);
}
}