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,7 +529,9 @@ bool BrowserWebViewDelegate::ShowFileChooser(std::vector<FilePath>& file_names,
|
||||||
withObject:default_dir
|
withObject:default_dir
|
||||||
withObject:default_filename];
|
withObject:default_filename];
|
||||||
} else {
|
} else {
|
||||||
|
if (default_dir)
|
||||||
[dialog setDirectoryURL:[NSURL URLWithString:default_dir]];
|
[dialog setDirectoryURL:[NSURL URLWithString:default_dir]];
|
||||||
|
if (default_filename)
|
||||||
[dialog setNameFieldStringValue:default_filename];
|
[dialog setNameFieldStringValue:default_filename];
|
||||||
result = [dialog runModal];
|
result = [dialog runModal];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue