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

Unified Diff: media/audio/audio_output_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 | « media/audio/audio_input_device.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_device.cc
diff --git a/media/audio/audio_output_device.cc b/media/audio/audio_output_device.cc
index d432103ce06112cc8fda0a0575fb3f39545ed416..eff1a0cbc0156af26ce966560fdedafd34f84c53 100644
--- a/media/audio/audio_output_device.cc
+++ b/media/audio/audio_output_device.cc
@@ -142,8 +142,11 @@ void AudioOutputDevice::ShutDownOnIOThread() {
if (stream_id_) {
is_started_ = false;
- ipc_->CloseStream(stream_id_);
- ipc_->RemoveDelegate(stream_id_);
+ if (ipc_) {
+ ipc_->CloseStream(stream_id_);
+ ipc_->RemoveDelegate(stream_id_);
+ }
+
stream_id_ = 0;
}
« no previous file with comments | « media/audio/audio_input_device.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698