Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Coudoin <bcoudoin@src.gnome.org>2005-09-11 21:18:07 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2005-09-11 21:18:07 (GMT)
commit598bb65a2619c4f7910485a6a16945ca59590845 (patch)
treea169b798967dd202c259cad74151961d60d2b845
parent45d030daa980f679669b4b1b3e27685d5a43fa50 (diff)
fixes a crash when no profiles (no sqlite).
-rw-r--r--src/gcompris/gcompris.c2
-rw-r--r--src/gcompris/gcompris_db.c18
2 files changed, 11 insertions, 9 deletions
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index a099ff1..a3c94ee 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -1152,7 +1152,7 @@ gcompris_init (int argc, char *argv[])
/*
- * Database nit MUST BE after properties
+ * Database init MUST BE after properties
* And after a possible alternate database as been provided
*
*/
diff --git a/src/gcompris/gcompris_db.c b/src/gcompris/gcompris_db.c
index 9b6e0f7..1d871aa 100644
--- a/src/gcompris/gcompris_db.c
+++ b/src/gcompris/gcompris_db.c
@@ -1326,14 +1326,16 @@ GHashTable *gcompris_get_board_conf()
hash_result);
/* conf values for profile (board independant) */
- hash_result = gcompris_get_conf_with_table(gcompris_get_current_profile()->profile_id,
- -1,
- hash_result);
-
- /* conf value for current profile and current board */
- hash_result = gcompris_get_conf_with_table(gcompris_get_current_profile()->profile_id,
- get_current_gcompris_board()->board_id,
- hash_result);
+ if(gcompris_get_current_profile()) {
+ hash_result = gcompris_get_conf_with_table(gcompris_get_current_profile()->profile_id,
+ -1,
+ hash_result);
+
+ /* conf value for current profile and current board */
+ hash_result = gcompris_get_conf_with_table(gcompris_get_current_profile()->profile_id,
+ get_current_gcompris_board()->board_id,
+ hash_result);
+ }
return hash_result;
}