Index: addressbook/backends/file/e-book-backend-file.c
===================================================================
--- addressbook/backends/file/e-book-backend-file.c	(revision 10050)
+++ addressbook/backends/file/e-book-backend-file.c	(working copy)
@@ -106,8 +106,13 @@
 string_to_dbt(const char *str, DBT *dbt)
 {
 	memset (dbt, 0, sizeof (*dbt));
-	dbt->data = (void*)str;
-	dbt->size = strlen (str) + 1;
+	if (str == NULL) {
+		dbt->data = g_strdup("");
+		dbt->size = 1;
+	} else {
+		dbt->data = (void*)str;
+		dbt->size = strlen (str) + 1;
+	}
 	dbt->flags = DB_DBT_USERMEM;
 }
 
