aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/database.c9
2 files changed, 6 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index a4c377fa5..b0518128a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
ver 0.15.1 (2009/??/??)
* commands:
- don't resume playback when stopping during pause
+* database: fixed NULL pointer dereference after charset change
ver 0.15 (2009/06/23)
diff --git a/src/database.c b/src/database.c
index 7257930bc..5a06dda98 100644
--- a/src/database.c
+++ b/src/database.c
@@ -318,10 +318,11 @@ db_load(GError **error)
if (old_charset != NULL
&& strcmp(new_charset, old_charset)) {
fclose(fp);
- g_message("Existing database has charset \"%s\" "
- "instead of \"%s\"; "
- "discarding database file",
- new_charset, old_charset);
+ g_set_error(error, db_quark(), 0,
+ "Existing database has charset "
+ "\"%s\" instead of \"%s\"; "
+ "discarding database file",
+ new_charset, old_charset);
return false;
}
} else {