diff --git a/widgets/graph.c b/widgets/graph.c index b81c06fe..ec107dcf 100644 --- a/widgets/graph.c +++ b/widgets/graph.c @@ -112,6 +112,8 @@ graph_plot_add(graph_data_t *d, const char *title) { plot_t plot; + p_clear(&plot, 1); + plot.title = a_strdup(title); plot.values = p_new(float, d->size); plot.lines = p_new(int, d->size); diff --git a/widgets/progressbar.c b/widgets/progressbar.c index fceba6af..c56a648b 100644 --- a/widgets/progressbar.c +++ b/widgets/progressbar.c @@ -95,6 +95,8 @@ progressbar_bar_add(progressbar_data_t *d, const char *title) { bar_t bar; + p_clear(&bar, 1); + bar.title = a_strdup(title); bar.fg = globalconf.colors.fg; bar.fg_off = globalconf.colors.bg;