diff --git a/atom/browser/ui/file_dialog_mac.mm b/atom/browser/ui/file_dialog_mac.mm index 1cbe46e3b55b..676c632a2a44 100644 --- a/atom/browser/ui/file_dialog_mac.mm +++ b/atom/browser/ui/file_dialog_mac.mm @@ -34,7 +34,12 @@ void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) { [file_type_set addObject:base::mac::CFToNSCast(ext_cf.get())]; } } - [dialog setAllowedFileTypes:[file_type_set allObjects]]; + + NSArray* file_types = nil; + if ([file_type_set count]) + file_types = [file_type_set allObjects]; + + [dialog setAllowedFileTypes: file_types]; } void SetupDialog(NSSavePanel* dialog,