Skip to content
Snippets Groups Projects
Commit 971892de authored by beng@google.com's avatar beng@google.com
Browse files

Fix a crash. Now sometimes TabContentses can be NULL it seems.

B=1297990

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84 0039d316-1c4b-4281-b951-d872f2087c98
parent ad7bc681
No related branches found
No related tags found
No related merge requests found
......@@ -820,8 +820,9 @@ void TabStrip::SelectTab(Tab* tab) {
void TabStrip::CloseTab(Tab* tab) {
int tab_index = GetIndexOfTab(tab);
if (tab_index != -1) {
UserMetrics::RecordAction(L"CloseTab_Mouse",
model_->GetTabContentsAt(tab_index)->profile());
TabContents* contents = model_->GetTabContentsAt(tab_index);
if (contents)
UserMetrics::RecordAction(L"CloseTab_Mouse", contents->profile());
Tab* last_tab = GetTabAt(GetTabCount() - 1);
// Limit the width available to the TabStrip for laying out Tabs, so that
// Tabs are not resized until a later time (when the mouse pointer leaves
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment