From 777a863bb6c3829dad617154ba3574e9592b85f9 Mon Sep 17 00:00:00 2001 From: Akemi Date: Thu, 25 Oct 2018 19:39:59 +0200 Subject: cocoa-cb: remove empty elements from dropped URLs Fixes #6241 --- video/out/cocoa-cb/events_view.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out/cocoa-cb') diff --git a/video/out/cocoa-cb/events_view.swift b/video/out/cocoa-cb/events_view.swift index 5a84d27b2b..667366285e 100644 --- a/video/out/cocoa-cb/events_view.swift +++ b/video/out/cocoa-cb/events_view.swift @@ -75,7 +75,8 @@ class EventsView: NSView { return true } } else if types.contains(NSURLPboardType) { - if let url = pb.propertyList(forType: NSURLPboardType) as? [Any] { + if var url = pb.propertyList(forType: NSURLPboardType) as? [String] { + url = url.filter{ !$0.isEmpty } EventsResponder.sharedInstance().handleFilesArray(url) return true } -- cgit v1.2.3