output/PipeWire: add nullptr check, fixing crash with PipeWire 0.3.53
Since PipeWire 0.3.53, control names can apparently be nulled, leading to crashes in applications assertion that the string cannot be nullptr. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1558
This commit is contained in:
parent
5a5655b790
commit
2ee57f9b0d
2
NEWS
2
NEWS
|
@ -1,6 +1,8 @@
|
|||
ver 0.23.8 (not yet released)
|
||||
* storage
|
||||
- curl: fix crash if web server does not understand WebDAV
|
||||
* output
|
||||
- pipewire: fix crash with PipeWire 0.3.53
|
||||
|
||||
ver 0.23.7 (2022/05/09)
|
||||
* database
|
||||
|
|
|
@ -235,7 +235,8 @@ private:
|
|||
[[maybe_unused]] uint32_t id,
|
||||
const struct pw_stream_control *control) noexcept {
|
||||
auto &o = *(PipeWireOutput *)data;
|
||||
if (StringIsEqual(control->name, "Channel Volumes"))
|
||||
if (control->name != nullptr &&
|
||||
StringIsEqual(control->name, "Channel Volumes"))
|
||||
o.ControlInfo(control);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue