Merge pull request #4810 from Alexays/copilot/fix-waybar-crash-pango

Fix Pango NULL layout crash in cava module
This commit is contained in:
Alexis Rouillard
2026-02-04 10:03:11 +01:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1 @@
.

View File

@ -47,9 +47,11 @@ auto waybar::modules::cava::Cava::onSilence() -> void {
if (label_.get_style_context()->has_class("updated"))
label_.get_style_context()->remove_class("updated");
if (hide_on_silence_)
if (hide_on_silence_) {
// Clear the label markup before hiding to prevent GTK from rendering a NULL Pango layout
label_.set_markup("");
label_.hide();
else if (config_["format_silent"].isString())
} else if (config_["format_silent"].isString())
label_.set_markup(format_silent_);
silence_ = true;
label_.get_style_context()->add_class("silent");