diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 11:41:44 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 11:41:44 +0000 |
commit | 52b15b4f40a2eb65a3d59c11d5f295d4217afe47 (patch) | |
tree | 45b55d46c82869db587d68a6f8ff485c0e01090a /media | |
parent | 1465da591bcfe131519096c2afef33a93953804d (diff) | |
download | chromium_src-52b15b4f40a2eb65a3d59c11d5f295d4217afe47.zip chromium_src-52b15b4f40a2eb65a3d59c11d5f295d4217afe47.tar.gz chromium_src-52b15b4f40a2eb65a3d59c11d5f295d4217afe47.tar.bz2 |
Fix crash in reading audio capture device name.
Relevant crash report: http://crash/reportdetail?reportid=c48906f8d604a9d5#crashing_thread
BUG=69608
TEST=none
Review URL: http://codereview.chromium.org/6333005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/win/audio_manager_win.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc index dee14c5..0c896d1 100644 --- a/media/audio/win/audio_manager_win.cc +++ b/media/audio/win/audio_manager_win.cc @@ -177,6 +177,9 @@ string16 AudioManagerWin::GetAudioInputDeviceModel() { waveInMessage(reinterpret_cast<HWAVEIN>(device_id), DRV_QUERYDEVICEINTERFACESIZE, reinterpret_cast<DWORD_PTR>(&device_interface_name_size), 0); + if (device_interface_name_size == 0) // No audio capture device? + return string16(); + string16 device_interface_name; string16::value_type* name_ptr = WriteInto(&device_interface_name, device_interface_name_size / sizeof(string16::value_type)); |