diff --git a/src/main.c b/src/main.c index 6c278fe4..85c53adb 100644 --- a/src/main.c +++ b/src/main.c @@ -347,7 +347,6 @@ main (gint argc, gchar *argv[]) int fd2 = open ("stderr.log", O_CREAT|O_WRONLY|O_TRUNC, 0666); dup2 (fd2, 2); #endif - gtk_set_locale (); gtk_init (&argc, &argv); main_init(&argc, &argv); diff --git a/src/misc.c b/src/misc.c index e034117d..5783905a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -544,7 +544,7 @@ misc_string_choose_random(gchar *string) return; count = math_rndi(0, count - 1) + 1; - start = string; + start = g_strdup(string); for (i = 0; string[i]; i++) if (string[i] == STR_SEP) { diff --git a/src/treeview.c b/src/treeview.c index 2aa3ccd4..8da1b6d3 100644 --- a/src/treeview.c +++ b/src/treeview.c @@ -2741,6 +2741,7 @@ treeview_create_country_list(const GPtrArray *country_list) } } g_strfreev(dir_split_up); + g_free(current_country); } return GTK_TREE_MODEL(ls); diff --git a/src/xml_league.c b/src/xml_league.c index 74294714..f4efc42a 100644 --- a/src/xml_league.c +++ b/src/xml_league.c @@ -258,8 +258,8 @@ xml_league_read_start_element (GMarkupParseContext *context, else if(strcmp(element_name, TAG_TEAM) == 0) { new_team = team_new(TRUE); - misc_string_assign(&new_team.symbol, new_league.symbol); - misc_string_assign(&new_team.names_file, new_league.names_file); + misc_string_assign(&(new_team.symbol), new_league.symbol); + misc_string_assign(&(new_team.names_file), new_league.names_file); new_team.clid = new_league.id; g_array_append_val(new_league.teams, new_team); state = STATE_TEAM;