[couchdb-glib] Don't add doc_info's if NULL
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [couchdb-glib] Don't add doc_info's if NULL
- Date: Thu, 24 Mar 2011 12:31:04 +0000 (UTC)
commit cb10bb36747cdb279e8e5d96ffa67d784f65d4da
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Thu Mar 24 13:30:59 2011 +0100
Don't add doc_info's if NULL
couchdb-glib/couchdb-database.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/couchdb-glib/couchdb-database.c b/couchdb-glib/couchdb-database.c
index b41c56f..4dd7b2b 100644
--- a/couchdb-glib/couchdb-database.c
+++ b/couchdb-glib/couchdb-database.c
@@ -287,6 +287,9 @@ couchdb_database_list_documents (CouchdbDatabase *database, GError **error)
json_object_get_string_member (
json_object_get_object_member (doc, "value"),
"rev"));
+ if (!doc_info)
+ continue;
+
doclist = g_slist_append (doclist, doc_info);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]