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

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

Issue 2606323002: Add null check for MediaDevicesManager in MDDH destructor. (Closed)
Patch Set: Created 3 years, 12 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/media_devices_dispatcher_host.cc
diff --git a/content/browser/renderer_host/media/media_devices_dispatcher_host.cc b/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
index d50e28a78e27a0f99215783ad6e34aad1ac3e0e1..32ce8dcf11910a755584b12aa9ae727bfe189ee7 100644
--- a/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
@@ -96,7 +96,8 @@ MediaDevicesDispatcherHost::MediaDevicesDispatcherHost(
MediaDevicesDispatcherHost::~MediaDevicesDispatcherHost() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (size_t i = 0; i < NUM_MEDIA_DEVICE_TYPES; ++i) {
- if (!device_change_subscriptions_[i].empty()) {
+ if (media_stream_manager_->media_devices_manager() &&
tommi (sloooow) - chröme 2017/01/03 13:13:20 would it make sense to do this check outside the f
Guido Urdaneta 2017/01/03 13:27:17 Done.
+ !device_change_subscriptions_[i].empty()) {
media_stream_manager_->media_devices_manager()
->UnsubscribeDeviceChangeNotifications(
static_cast<MediaDeviceType>(i), this);
« 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