diff --git a/crates/gpui/src/platform/test/platform.rs b/crates/gpui/src/platform/test/platform.rs index 16898d4636..10c90d8c94 100644 --- a/crates/gpui/src/platform/test/platform.rs +++ b/crates/gpui/src/platform/test/platform.rs @@ -38,6 +38,12 @@ pub(crate) struct TestPrompts { impl TestPlatform { pub fn new(executor: BackgroundExecutor, foreground_executor: ForegroundExecutor) -> Rc { + #[cfg(target_os = "windows")] + unsafe { + windows::Win32::System::Ole::OleInitialize(None) + .expect("unable to initialize Windows OLE"); + } + Rc::new_cyclic(|weak| TestPlatform { background_executor: executor, foreground_executor,