mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-28 13:58:48 +02:00
Fix Segfault when ALSA device has no description
This commit is contained in:
parent
da58cb51a8
commit
8593cd87ea
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue