summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 23:16:56 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 23:16:56 +0000
commit3697dc7a46be81c92c32fa8f1400801c699e7b55 (patch)
tree9e57cb1b15bc3aabb3220e54918b9ca0fb5efbd9
parent91659371e781d412d5b7a3bc1489a4cc10f99e91 (diff)
downloadchromium_src-3697dc7a46be81c92c32fa8f1400801c699e7b55.zip
chromium_src-3697dc7a46be81c92c32fa8f1400801c699e7b55.tar.gz
chromium_src-3697dc7a46be81c92c32fa8f1400801c699e7b55.tar.bz2
[omnibox] Ignore empty search suggestions.
Google search may return empty suggestions for some weird input characters. We need to ignore them, to avoid breaking the omnibox. BUG=56214 TEST=(On Mac) In omnibox press option-i and wait for a while. Chrome shouldn't crash. Review URL: http://codereview.chromium.org/3532004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61005 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index c53fb4d..c1efe82 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -538,7 +538,7 @@ void AutocompletePopupViewMac::OpenURLForRow(int row, bool force_background) {
// Adjust the title position to be lined up under the field's text.
NSAttributedString* title = [self attributedTitle];
- if (title) {
+ if (title && [title length]) {
NSRect titleRect = cellFrame;
titleRect.size.width -= kTextXOffset;
titleRect.origin.x += kTextXOffset;