Mac: Fix crash with input element of type "file" when the default file name is empty (issue #823).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1023 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
fc0fd84371
commit
3b834de6bb
|
@ -529,8 +529,10 @@ bool BrowserWebViewDelegate::ShowFileChooser(std::vector<FilePath>& file_names,
|
|||
withObject:default_dir
|
||||
withObject:default_filename];
|
||||
} else {
|
||||
[dialog setDirectoryURL:[NSURL URLWithString:default_dir]];
|
||||
[dialog setNameFieldStringValue:default_filename];
|
||||
if (default_dir)
|
||||
[dialog setDirectoryURL:[NSURL URLWithString:default_dir]];
|
||||
if (default_filename)
|
||||
[dialog setNameFieldStringValue:default_filename];
|
||||
result = [dialog runModal];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue