diff options
author | 2011-08-28 21:57:43 +0000 | |
---|---|---|
committer | 2011-08-28 21:57:43 +0000 | |
commit | 005e02e6a87f6cbd21fb0d778d6b73d40c7bacf1 (patch) | |
tree | 551e6022d45171ec836ae8b6a9767b0e58c0f4a3 /src/trg-prefs.c | |
parent | 7396c19eb425bb47eaa51956fd8cfaae39fe8cc8 (diff) |
fix for last fix
Diffstat (limited to 'src/trg-prefs.c')
-rw-r--r-- | src/trg-prefs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/trg-prefs.c b/src/trg-prefs.c index cc56944..bd26928 100644 --- a/src/trg-prefs.c +++ b/src/trg-prefs.c @@ -247,13 +247,14 @@ JsonObject *trg_prefs_new_profile(TrgPrefs *p) { } void trg_prefs_del_profile(TrgPrefs *p, JsonObject *profile) { - GList *profiles = json_array_get_elements(trg_prefs_get_profiles(p)); + JsonArray *profiles = trg_prefs_get_profiles(p); + GList *profilesList = json_array_get_elements(profiles); GList *li; JsonNode *node; int i = 0; - for (li = profiles; li; li = g_list_next(li)) { + for (li = profilesList; li; li = g_list_next(li)) { node = (JsonNode*) li->data; if (profile == (gpointer) json_node_get_object(node)) { json_array_remove_element(profiles, i); @@ -262,7 +263,7 @@ void trg_prefs_del_profile(TrgPrefs *p, JsonObject *profile) { i++; } - g_list_free(profiles); + g_list_free(profilesList); } JsonObject* trg_prefs_get_profile(TrgPrefs *p) { |