From 6a1d1de39030c02cad6a7686b9ca42cffc4c932f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mo=C5=84?= Date: Sat, 2 May 2009 14:25:50 +0200 Subject: [PATCH] fix compiler warning --- gui.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui.c b/gui.c index 56039f2..f58922c 100644 --- a/gui.c +++ b/gui.c @@ -361,7 +361,7 @@ GtkWidget *create_widget_container(EffectGroup *group, gint amt) gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), group[x].label); cmbox_no++; - if ((group[x].settings != NULL) && (group[x].settings > 0)) { + if ((group[x].settings != NULL) && (group[x].settings_amt > 0)) { widget = create_table(group[x].settings, group[x].settings_amt, widget_table); g_object_ref_sink(widget); } else @@ -379,8 +379,10 @@ GtkWidget *create_widget_container(EffectGroup *group, gint amt) g_object_set_data_full(G_OBJECT(combo_box), name, settings, ((GDestroyNotify)effect_settings_group_free)); g_free(name); } else { - widget = create_table(group[x].settings, group[x].settings_amt, widget_table); - gtk_container_add(GTK_CONTAINER(vbox), widget); + if ((group[x].settings != NULL) && (group[x].settings_amt > 0)) { + widget = create_table(group[x].settings, group[x].settings_amt, widget_table); + gtk_container_add(GTK_CONTAINER(vbox), widget); + } } }