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

Unified Diff: media/audio/audio_input_device.cc

Issue 10821109: Candidate fix for a crash at shutdown when the IO thread is going away. More details in the bug rep… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed the input filter... damn you code duplication! Created 8 years, 5 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 | « content/renderer/media/audio_message_filter_unittest.cc ('k') | media/audio/audio_output_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_device.cc
diff --git a/media/audio/audio_input_device.cc b/media/audio/audio_input_device.cc
index 381af19c22878230da3e998918b55759512dcb10..401042acf26d8cded7a7f25fd12611a238620a61 100644
--- a/media/audio/audio_input_device.cc
+++ b/media/audio/audio_input_device.cc
@@ -253,8 +253,10 @@ void AudioInputDevice::ShutDownOnIOThread() {
// NOTE: |completion| may be NULL.
// Make sure we don't call shutdown more than once.
if (stream_id_) {
- ipc_->CloseStream(stream_id_);
- ipc_->RemoveDelegate(stream_id_);
+ if (ipc_) {
+ ipc_->CloseStream(stream_id_);
+ ipc_->RemoveDelegate(stream_id_);
+ }
stream_id_ = 0;
session_id_ = 0;
« no previous file with comments | « content/renderer/media/audio_message_filter_unittest.cc ('k') | media/audio/audio_output_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698