Merge pull request #4810 from Alexays/copilot/fix-waybar-crash-pango
Fix Pango NULL layout crash in cava module
This commit is contained in:
1
_codeql_detected_source_root
Symbolic link
1
_codeql_detected_source_root
Symbolic link
@ -0,0 +1 @@
|
||||
.
|
||||
@ -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");
|
||||
|
||||
Reference in New Issue
Block a user