projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b308cd6
)
Add comment on why checking empty set
author
Cheng Zhao
<zcbenz@gmail.com>
Thu, 31 Dec 2015 10:58:16 +0000
(18:58 +0800)
committer
Cheng Zhao
<zcbenz@gmail.com>
Thu, 31 Dec 2015 10:58:16 +0000
(18:58 +0800)
atom/browser/ui/file_dialog_mac.mm
patch
|
blob
|
history
diff --git
a/atom/browser/ui/file_dialog_mac.mm
b/atom/browser/ui/file_dialog_mac.mm
index
676c632
..
49662c6
100644
(file)
--- a/
atom/browser/ui/file_dialog_mac.mm
+++ b/
atom/browser/ui/file_dialog_mac.mm
@@
-35,11
+35,12
@@
void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
}
}
+ // Passing empty array to setAllowedFileTypes will cause exception.
NSArray* file_types = nil;
if ([file_type_set count])
file_types = [file_type_set allObjects];
- [dialog setAllowedFileTypes:
file_types];
+ [dialog setAllowedFileTypes:file_types];
}
void SetupDialog(NSSavePanel* dialog,