Skip to content

Commit

Permalink
Don't crash when the ADM fails to init. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-signal authored May 20, 2020
1 parent 60f3406 commit a716a9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion media/engine/adm_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ namespace adm_helpers {
void Init(AudioDeviceModule* adm) {
RTC_DCHECK(adm);

RTC_CHECK_EQ(0, adm->Init()) << "Failed to initialize the ADM.";
auto result = adm->Init();
if (result != 0) {
RTC_LOG(LS_ERROR) << "Failed to initialize the ADM: " << result;
return;
}

// Playout device.
{
Expand Down

0 comments on commit a716a9d

Please sign in to comment.