Add comment on why checking empty set

This commit is contained in:
Cheng Zhao 2015-12-31 18:58:16 +08:00
parent b308cd6f96
commit 8aced2c31e

View file

@ -35,6 +35,7 @@ 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];