| Index: chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc (revision 86419)
|
| +++ chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc (working copy)
|
| @@ -90,6 +90,9 @@
|
| : host_(host),
|
| browser_view_(view),
|
| observing_(false) {
|
| + DCHECK(host_);
|
| + DCHECK(browser_view_);
|
| + DCHECK(browser_view_->GetWidget());
|
| top_level_window_ = browser_view_->GetWidget()->GetNativeView();
|
| }
|
|
|
| @@ -163,8 +166,10 @@
|
| if (HitOnScreen(host_->view(), p)) {
|
| return false;
|
| }
|
| - // Treat the bookmark as a content area when it in detached mode.
|
| - if (browser_view_->GetBookmarkBarView()->IsDetached() &&
|
| + // Treat the bookmark as a content area when it in detached mode. We must
|
| + // check the view itself as it can be NULL for example in popup windows.
|
| + if (browser_view_->GetBookmarkBarView() &&
|
| + browser_view_->GetBookmarkBarView()->IsDetached() &&
|
| browser_view_->IsBookmarkBarVisible() &&
|
| HitOnScreen(browser_view_->GetBookmarkBarView(), p)) {
|
| return true;
|
|
|