summaryrefslogtreecommitdiffstats
path: root/chromeos/audio
diff options
context:
space:
mode:
authorspang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-26 11:38:16 +0000
committerspang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-26 11:38:16 +0000
commit75521c61d64c8ff8055de97b22c35a8a58657695 (patch)
tree8c0dcbcaf5f946f70c3df6ccc7d6a7002aeb5751 /chromeos/audio
parent4a7d8da91fbd6934decdb9605c81b245c4137ecc (diff)
downloadchromium_src-75521c61d64c8ff8055de97b22c35a8a58657695.zip
chromium_src-75521c61d64c8ff8055de97b22c35a8a58657695.tar.gz
chromium_src-75521c61d64c8ff8055de97b22c35a8a58657695.tar.bz2
Fix crash in CrasAudioHandler::GetActiveOutputDevice if there are no devices
BUG=263829 TEST=manual Review URL: https://chromiumcodereview.appspot.com/20000005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/audio')
-rw-r--r--chromeos/audio/cras_audio_handler.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc
index 48f07f7..92e984b 100644
--- a/chromeos/audio/cras_audio_handler.cc
+++ b/chromeos/audio/cras_audio_handler.cc
@@ -171,7 +171,7 @@ void CrasAudioHandler::GetAudioDevices(AudioDeviceList* device_list) const {
bool CrasAudioHandler::GetActiveOutputDevice(AudioDevice* device) const {
const AudioDevice* active_device = GetDeviceFromId(active_output_node_id_);
- if (!device)
+ if (!active_device || !device)
return false;
*device = *active_device;
return true;