mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-09-29 21:49:07 +00:00
Fix segfault on pulseaudio tunnel sinks
This commit is contained in:
parent
26d23cb707
commit
2a7226d893
@ -62,8 +62,13 @@ void pa_sink_info_callback(pa_context *c, const pa_sink_info *i, int eol,
|
||||
pdr->sink_mute = i->mute;
|
||||
pdr->sink_card = i->card;
|
||||
pdr->sink_index = i->index;
|
||||
pdr->sink_active_port_name.assign(i->active_port->name);
|
||||
pdr->sink_active_port_description.assign(i->active_port->description);
|
||||
if (i->active_port != nullptr) {
|
||||
pdr->sink_active_port_name.assign(i->active_port->name);
|
||||
pdr->sink_active_port_description.assign(i->active_port->description);
|
||||
} else {
|
||||
pdr->sink_active_port_name.erase();
|
||||
pdr->sink_active_port_description.erase();
|
||||
}
|
||||
pdr->sink_volume = round_to_positive_int(
|
||||
100.0f * (float)pa_cvolume_avg(&(i->volume)) / (float)PA_VOLUME_NORM);
|
||||
pa_threaded_mainloop_signal(pulseaudio->mainloop, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user