Skip to content

Commit

Permalink
Merge pull request #12 from jniewerth/patch-1
Browse files Browse the repository at this point in the history
Fix Segfault when ALSA device has no description
  • Loading branch information
badaix committed Nov 15, 2015
2 parents da58cb5 + 8593cd8 commit b4a2389
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/alsaPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ vector<PcmDevice> Player::pcm_list(void)
if (io != NULL && strcmp(io, "Output") != 0)
goto __end;
pcmDevice.name = name;
pcmDevice.description = descr;
if(descr == NULL) {
pcmDevice.description = "";
} else {
pcmDevice.description = descr;
}
pcmDevice.idx = idx++;
result.push_back(pcmDevice);

Expand Down

0 comments on commit b4a2389

Please sign in to comment.