Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1682)

Unified Diff: chrome/browser/media/media_stream_capture_indicator.cc

Issue 10831370: quick fix to a crash when closing down the browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: quick fix the a crash Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/media_stream_capture_indicator.cc
diff --git a/chrome/browser/media/media_stream_capture_indicator.cc b/chrome/browser/media/media_stream_capture_indicator.cc
index 76ee728f356f7ca87fc7e90ac6aebaef824816b3..52a02ead25d0a591b8127f199f5a280caa55f6ee 100644
--- a/chrome/browser/media/media_stream_capture_indicator.cc
+++ b/chrome/browser/media/media_stream_capture_indicator.cc
@@ -331,12 +331,12 @@ void MediaStreamCaptureIndicator::UpdateStatusTrayIconContextMenu() {
bool video = false;
int command_id = IDC_MEDIA_CONTEXT_MEDIA_STREAM_CAPTURE_LIST_FIRST;
for (CaptureDeviceTabs::iterator iter = tabs_.begin();
- iter != tabs_.end(); ++iter) {
+ iter != tabs_.end();) {
string16 tab_title = GetTitle(iter->render_process_id,
iter->render_view_id);
if (tab_title.empty()) {
// Delete the entry since the tab has gone away.
- tabs_.erase(iter);
+ iter = tabs_.erase(iter);
continue;
}
@@ -353,6 +353,7 @@ void MediaStreamCaptureIndicator::UpdateStatusTrayIconContextMenu() {
break;
++command_id;
+ ++iter;
}
if (!audio && !video) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698