Chromium Code Reviews| 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); |