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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.cc

Issue 2419613003: VideoCaptureManager: handle case when GetDeviceEntryBySessionId is null (Closed)
Patch Set: Created 4 years, 2 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: content/browser/renderer_host/media/video_capture_manager.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index f86009aefed82fc268dcaa99a0e31868d7a13577..924e9bf8059988210bb2dfa56633f6fe0dccb071 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -550,8 +550,9 @@ void VideoCaptureManager::OnDeviceStarted(
auto request = photo_request_queue_.begin();
while(request != photo_request_queue_.end()) {
- if (GetDeviceEntryBySessionId(request->first)->video_capture_device()) {
- request->second.Run(entry->video_capture_device());
+ DeviceEntry* maybe_entry = GetDeviceEntryBySessionId(request->first);
+ if (maybe_entry && maybe_entry->video_capture_device()) {
+ request->second.Run(maybe_entry->video_capture_device());
photo_request_queue_.erase(request);
}
++request;
« 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