summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-22 17:28:27 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-22 17:28:27 +0000
commit1733651c19923ce5aaa8918f038ea106ab42c7ec (patch)
tree34395face3cf538e9fec0194e3aed36d67929b4c /chrome/browser/tab_contents
parent1b36b7452c0dd6c2482092ce2184fc4353fd0ac8 (diff)
downloadchromium_src-1733651c19923ce5aaa8918f038ea106ab42c7ec.zip
chromium_src-1733651c19923ce5aaa8918f038ea106ab42c7ec.tar.gz
chromium_src-1733651c19923ce5aaa8918f038ea106ab42c7ec.tar.bz2
Fixes bug where match preview wouldn't get hidden if match preview was
showing and you pressed control-w. BUG=54833 TEST=none Review URL: http://codereview.chromium.org/3453016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60191 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/match_preview.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/match_preview.cc b/chrome/browser/tab_contents/match_preview.cc
index 1d24287..1ddd4e9 100644
--- a/chrome/browser/tab_contents/match_preview.cc
+++ b/chrome/browser/tab_contents/match_preview.cc
@@ -505,6 +505,11 @@ void MatchPreview::SetOmniboxBounds(const gfx::Rect& bounds) {
}
void MatchPreview::DestroyPreviewContents() {
+ if (!preview_contents_.get()) {
+ // We're not showing anything, nothing to do.
+ return;
+ }
+
delegate_->HideMatchPreview();
delete ReleasePreviewContents(false);
}