summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/android/FileChooserAndroid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/android/FileChooserAndroid.cpp')
-rw-r--r--WebCore/platform/android/FileChooserAndroid.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebCore/platform/android/FileChooserAndroid.cpp b/WebCore/platform/android/FileChooserAndroid.cpp
index 2c75373..a8c4150 100644
--- a/WebCore/platform/android/FileChooserAndroid.cpp
+++ b/WebCore/platform/android/FileChooserAndroid.cpp
@@ -31,7 +31,10 @@
namespace WebCore {
String FileChooser::basenameForWidth(const Font& font, int width) const
-{
+{
+ if (m_filenames.size() == 0) {
+ return String();
+ }
// FIXME: This could be a lot faster, but assuming the data will not
// often be much longer than the provided width, this may be fast enough.
String output = m_filenames[0].copy();