Disconnect from PipeWire when destroying the WirePlumber module

This fixes a crash where PipeWire tries to send events to a destroyed
WirePlumber module.
This commit is contained in:
Alexander Bakker 2023-11-29 22:46:58 +01:00
parent 58db0baaf4
commit 6be5f7cb29
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ waybar::modules::Wireplumber::Wireplumber(const std::string& id, const Json::Val
}
waybar::modules::Wireplumber::~Wireplumber() {
wp_core_disconnect(wp_core_);
g_clear_pointer(&apis_, g_ptr_array_unref);
g_clear_object(&om_);
g_clear_object(&wp_core_);