diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-15 03:03:30 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-15 03:03:30 +0000 |
commit | 9504f194280791e04b468ecb518e175305757c5f (patch) | |
tree | 7f3411d03213e38048c91bd7c15fc5ee1f642f17 /chrome/views/tabbed_pane.cc | |
parent | 4ff391fcc5b88061912f73ec570f389100cc5e2a (diff) | |
download | chromium_src-9504f194280791e04b468ecb518e175305757c5f.zip chromium_src-9504f194280791e04b468ecb518e175305757c5f.tar.gz chromium_src-9504f194280791e04b468ecb518e175305757c5f.tar.bz2 |
Fix erase method usage on STL containers in Chrome. Invoking erase on the iterator renders it invalid. We were continuing to use this iterator.
R=darin
Review URL: http://codereview.chromium.org/10925
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/tabbed_pane.cc')
-rw-r--r-- | chrome/views/tabbed_pane.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/views/tabbed_pane.cc b/chrome/views/tabbed_pane.cc index bab0d72..9fe72a7 100644 --- a/chrome/views/tabbed_pane.cc +++ b/chrome/views/tabbed_pane.cc @@ -120,9 +120,10 @@ View* TabbedPane::RemoveTabAtIndex(int index) { ResizeContents(tab_control_); std::vector<View*>::iterator iter = tab_views_.begin() + index; + View* removed_tab = *iter; tab_views_.erase(iter); - return *iter; + return removed_tab; } void TabbedPane::SelectTabAt(int index) { |