Merge pull request #5112 from jaschiu/patch-2
fix(niri/workspaces): segfault when setting workspace button markup
This commit is contained in:
@@ -103,7 +103,9 @@ void Workspaces::doUpdate() {
|
|||||||
fmt::arg("output", ws["output"].asString()));
|
fmt::arg("output", ws["output"].asString()));
|
||||||
}
|
}
|
||||||
if (!config_["disable-markup"].asBool()) {
|
if (!config_["disable-markup"].asBool()) {
|
||||||
static_cast<Gtk::Label*>(button.get_children()[0])->set_markup(name);
|
auto* child = gtk_bin_get_child(GTK_BIN(button.gobj()));
|
||||||
|
if (child != nullptr && GTK_IS_LABEL(child))
|
||||||
|
gtk_label_set_markup(GTK_LABEL(child), name.c_str());
|
||||||
} else {
|
} else {
|
||||||
button.set_label(name);
|
button.set_label(name);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user