macos: speculative fix to drag-n-drop crash
refs: https://github.com/wez/wezterm/issues/4771
This commit is contained in:
2 files changed
+18
No files matched your search
@@ -36,6 +36,8 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
#4876
|
||||
* macOS: wacky initial window size with external monitors or certain font
|
||||
sizes. #4966 #4250
|
||||
* macOS: dragging non-filename data over wezterm could cause it to crash. #4771
|
||||
|
||||
#### Updated
|
||||
* Bundled conpty.dll and OpenConsole.exe to build 1.19.240130002.nupkg
|
||||
|
||||
|
||||
@@ -2957,8 +2957,16 @@ impl WindowView {
|
||||
let mut inner = this.inner.borrow_mut();
|
||||
|
||||
let pb: id = unsafe { msg_send![sender, draggingPasteboard] };
|
||||
if pb.is_null() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
let filenames =
|
||||
unsafe { NSPasteboard::propertyListForType(pb, appkit::NSFilenamesPboardType) };
|
||||
if filenames.is_null() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
let paths = unsafe { filenames.iter() }
|
||||
.map(|file| unsafe {
|
||||
let path = nsstring_to_str(file);
|
||||
@@ -2975,8 +2983,16 @@ impl WindowView {
|
||||
let mut inner = this.inner.borrow_mut();
|
||||
|
||||
let pb: id = unsafe { msg_send![sender, draggingPasteboard] };
|
||||
if pb.is_null() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
let filenames =
|
||||
unsafe { NSPasteboard::propertyListForType(pb, appkit::NSFilenamesPboardType) };
|
||||
if filenames.is_null() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
let paths = unsafe { filenames.iter() }
|
||||
.map(|file| unsafe {
|
||||
let path = nsstring_to_str(file);
|
||||
|
||||
Reference in new issue
Block a user