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; |