[gcompris/gcomprixogoo] Fixed missingletter crash uppon changing its locale.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] Fixed missingletter crash uppon changing its locale.
- Date: Sun, 17 Jan 2010 00:02:55 +0000 (UTC)
commit d2d05ef2ca47e828d235610fc7c95eb211f580bf
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Sun Jan 17 01:01:22 2010 +0100
Fixed missingletter crash uppon changing its locale.
http://bugzilla.gnome.org/show_bug.cgi?id=607054
src/missing_letter-activity/missingletter.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/missing_letter-activity/missingletter.c b/src/missing_letter-activity/missingletter.c
index d693be1..06fb38a 100644
--- a/src/missing_letter-activity/missingletter.c
+++ b/src/missing_letter-activity/missingletter.c
@@ -144,7 +144,6 @@ static void _init(GcomprisBoard *agcomprisBoard)
gcomprisBoard_missing->sublevel=1;
gcomprisBoard_missing->number_of_sublevel=G_MAXINT;
- init_xml(gcomprisBoard_missing->level);
}
/*
@@ -199,7 +198,6 @@ set_level (guint level)
{
gcomprisBoard_missing->level=level;
gcomprisBoard_missing->sublevel=1;
- init_xml(gcomprisBoard_missing->level);
missing_letter_next_level();
}
}
@@ -644,12 +642,14 @@ void
missing_destroy_board_list(GList *list)
{
Board *board;
- while(g_list_length(list)>0)
+ guint length = g_list_length(list);
+
+ while( length-- )
{
- board = g_list_nth_data(list, 0);
- list = g_list_remove (list, board);
+ board = g_list_nth_data(list, length);
destroy_board(board);
}
+ g_list_free(list);
}
/* ======================================= */
@@ -717,6 +717,7 @@ conf_ok(GHashTable *table)
g_hash_table_destroy(config);
missing_destroy_board_list(board_list);
+ board_list = NULL;
init_xml(gcomprisBoard_missing->level);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]