---
widgets/graph.c | 2 ++
widgets/progressbar.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/widgets/graph.c b/widgets/graph.c
index ec107dc..6f3e3b0 100644
--- a/widgets/graph.c
+++ b/widgets/graph.c
@@ -364,6 +364,8 @@ luaA_graph_plot_data_add(lua_State *L)
plot = &d->plots.tab[j];
if(!a_strcmp(title, plot->title))
break;
+ else
+ bar = NULL;
}
/* no plot found -> create one */
diff --git a/widgets/progressbar.c b/widgets/progressbar.c
index c56a648..0073e8b 100644
--- a/widgets/progressbar.c
+++ b/widgets/progressbar.c
@@ -419,6 +419,8 @@ luaA_progressbar_bar_properties_set(lua_State *L)
bar = &d->bars.tab[j];
if(!a_strcmp(title, bar->title))
break;
+ else
+ bar = NULL;
}
/* no bar found -> create one */