Add comment on why checking empty set
This commit is contained in:
parent
b308cd6f96
commit
8aced2c31e
1 changed files with 2 additions and 1 deletions
|
@ -35,11 +35,12 @@ void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Passing empty array to setAllowedFileTypes will cause exception.
|
||||||
NSArray* file_types = nil;
|
NSArray* file_types = nil;
|
||||||
if ([file_type_set count])
|
if ([file_type_set count])
|
||||||
file_types = [file_type_set allObjects];
|
file_types = [file_type_set allObjects];
|
||||||
|
|
||||||
[dialog setAllowedFileTypes: file_types];
|
[dialog setAllowedFileTypes:file_types];
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupDialog(NSSavePanel* dialog,
|
void SetupDialog(NSSavePanel* dialog,
|
||||||
|
|
Loading…
Reference in a new issue