[gnac] Code hardening
- From: BenoÃt Dupasquier <bdupasqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac] Code hardening
- Date: Thu, 26 Jan 2012 19:27:32 +0000 (UTC)
commit 6ad432ee438858bcc508d8f7d057eca494da0d99
Author: BenoÃt Dupasquier <bdupasqu src gnome org>
Date: Thu Jan 26 19:21:19 2012 +0000
Code hardening
src/profiles/gnac-profiles-utils.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/profiles/gnac-profiles-utils.c b/src/profiles/gnac-profiles-utils.c
index ee816e9..bf26865 100755
--- a/src/profiles/gnac-profiles-utils.c
+++ b/src/profiles/gnac-profiles-utils.c
@@ -329,7 +329,9 @@ gnac_profiles_utils_get_value_combo(GtkWidget *combo)
{
gint index = gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
ComboValues *values = g_object_get_data(G_OBJECT(combo), "combo-values");
- return g_strconcat(g_list_nth_data(values->values, index), NULL);
+ if (!values) return NULL;
+
+ return g_strdup(g_list_nth_data(values->values, index));
}
@@ -489,7 +491,7 @@ gnac_profiles_utils_add_pipes(gchar *pipeline,
gchar *temp;
if (gnac_utils_string_is_null_or_empty(pipeline)) {
- temp = g_strconcat(v->value, NULL);
+ temp = g_strdup(v->value);
} else {
temp = g_strconcat(pipeline, " ! ", v->value, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]