summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-22 02:24:32 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-22 02:24:32 +0000
commit7646f9268284aad761f4640ee67ae16e739ade13 (patch)
treef1e25cdd447250d26c362f6877d6aa844c674790 /media
parent7c5ae13dbcbbb142c1ba634a291fb854f6bfb652 (diff)
downloadchromium_src-7646f9268284aad761f4640ee67ae16e739ade13.zip
chromium_src-7646f9268284aad761f4640ee67ae16e739ade13.tar.gz
chromium_src-7646f9268284aad761f4640ee67ae16e739ade13.tar.bz2
Blind fix for a Linux only crash in AudioManager::Destroy
BUG=80059 TEST=none Review URL: http://codereview.chromium.org/6878081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/audio/audio_manager.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/media/audio/audio_manager.cc b/media/audio/audio_manager.cc
index 4cdcbf3..b11cb9c 100644
--- a/media/audio/audio_manager.cc
+++ b/media/audio/audio_manager.cc
@@ -14,11 +14,13 @@ static AudioManager* g_audio_manager = NULL;
void AudioManager::Destroy(void* not_used) {
g_destroy_called = true;
- g_audio_manager->Cleanup();
+ if (g_audio_manager) {
+ g_audio_manager->Cleanup();
- AudioManager* audio_manager = g_audio_manager;
- g_audio_manager = NULL;
- delete audio_manager;
+ AudioManager* audio_manager = g_audio_manager;
+ g_audio_manager = NULL;
+ delete audio_manager;
+ }
}
// static