summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 18:38:13 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 18:38:13 +0000
commita48bb10d665602130c35569ae2135e81a4d85d4d (patch)
treee8326cf21ed606a49182dc12f92c085903a276ec /chrome
parentd475f152f5e1f9e151fa7ca24329c4d0300ed8b3 (diff)
downloadchromium_src-a48bb10d665602130c35569ae2135e81a4d85d4d.zip
chromium_src-a48bb10d665602130c35569ae2135e81a4d85d4d.tar.gz
chromium_src-a48bb10d665602130c35569ae2135e81a4d85d4d.tar.bz2
Fixes crash by checking for NULL when showing popup. This can happen
because ImmGetDefaultIMEWnd may trigger a focus lost, thereby closing the popup so that when we get to Show the popup is NULL. BUG=92497 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7833045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
index 10cf688..bf104f2 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -364,6 +364,13 @@ void AutocompletePopupContentsView::UpdatePopupAppearance() {
popup_->SetContentsView(this);
popup_->MoveAbove(
GetRelativeWindowForPopup(omnibox_view_->GetNativeView()));
+ if (!popup_.get()) {
+ // For some IMEs GetRelativeWindowForPopup triggers the omnibox to lose
+ // focus, thereby closing (and destroying) the popup.
+ // TODO: this won't be needed once we close the omnibox on input window
+ // showing.
+ return;
+ }
popup_->Show();
} else {
// Animate the popup shrinking, but don't animate growing larger since that