Commit 52b15b4f authored by satish@chromium.org's avatar satish@chromium.org

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
parent 1465da59
...@@ -177,6 +177,9 @@ string16 AudioManagerWin::GetAudioInputDeviceModel() { ...@@ -177,6 +177,9 @@ string16 AudioManagerWin::GetAudioInputDeviceModel() {
waveInMessage(reinterpret_cast<HWAVEIN>(device_id), waveInMessage(reinterpret_cast<HWAVEIN>(device_id),
DRV_QUERYDEVICEINTERFACESIZE, DRV_QUERYDEVICEINTERFACESIZE,
reinterpret_cast<DWORD_PTR>(&device_interface_name_size), 0); 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 device_interface_name;
string16::value_type* name_ptr = WriteInto(&device_interface_name, string16::value_type* name_ptr = WriteInto(&device_interface_name,
device_interface_name_size / sizeof(string16::value_type)); device_interface_name_size / sizeof(string16::value_type));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment