From 03de38b4d0884be0700d97f21562bf8acf8ee009 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 08:54:32 +0000 Subject: [PATCH] Fix Pango NULL layout crash by clearing markup before hiding label Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com> --- src/modules/cava/cavaRaw.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/cava/cavaRaw.cpp b/src/modules/cava/cavaRaw.cpp index edec902b..d6a9e001 100644 --- a/src/modules/cava/cavaRaw.cpp +++ b/src/modules/cava/cavaRaw.cpp @@ -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");