| Index: chrome/browser/views/bookmark_bar_view.cc
|
| diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
|
| index db381630b3802a41307d712cb7030722ed2d6f1f..9188aa52ab658773e37f957faf333d6c64e0825b 100644
|
| --- a/chrome/browser/views/bookmark_bar_view.cc
|
| +++ b/chrome/browser/views/bookmark_bar_view.cc
|
| @@ -447,11 +447,13 @@ void BookmarkBarView::SetProfile(Profile* profile) {
|
| delete GetChildViewAt(0);
|
|
|
| model_ = profile_->GetBookmarkModel();
|
| - model_->AddObserver(this);
|
| - if (model_->IsLoaded())
|
| - Loaded(model_);
|
| - // else case: we'll receive notification back from the BookmarkModel when done
|
| - // loading, then we'll populate the bar.
|
| + if (model_) {
|
| + model_->AddObserver(this);
|
| + if (model_->IsLoaded())
|
| + Loaded(model_);
|
| + // else case: we'll receive notification back from the BookmarkModel when
|
| + // done loading, then we'll populate the bar.
|
| + }
|
| }
|
|
|
| void BookmarkBarView::SetPageNavigator(PageNavigator* navigator) {
|
|
|