Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix crash during drag-and-drop on Windows (#42227)
John Tura66dac7b3a06
diff --git a/crates/gpui/src/platform/windows/window.rs b/crates/gpui/src/platform/windows/window.rsindex e7ef395df23..a9217a85e3e 100644--- a/crates/gpui/src/platform/windows/window.rs+++ b/crates/gpui/src/platform/windows/window.rs@@ -901,9 +901,9 @@ impl IDropTarget_Impl for WindowsDragDropHandler_Impl {if idata.u.hGlobal.is_invalid() {return Ok(());}- let hdrop = idata.u.hGlobal.0 as *mut HDROP;+ let hdrop = HDROP(idata.u.hGlobal.0);let mut paths = SmallVec::<[PathBuf; 2]>::new();- with_file_names(*hdrop, |file_name| {+ with_file_names(hdrop, |file_name| {if let Some(path) = PathBuf::from_str(&file_name).log_err() {paths.push(path);}