[couchdb-glib] Verify that the design doc and view name are not NULL when executing view



commit 5021bc3fe548d0ee47e53b13f495945f7f16dea0
Author: Moses PalmÃr <mosespalmer gmail com>
Date:   Sat Aug 20 22:23:50 2011 +0200

    Verify that the design doc and view name are not NULL when executing view

 couchdb-glib/couchdb-database.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/couchdb-glib/couchdb-database.c b/couchdb-glib/couchdb-database.c
index 113e2eb..8706d8d 100644
--- a/couchdb-glib/couchdb-database.c
+++ b/couchdb-glib/couchdb-database.c
@@ -455,6 +455,8 @@ couchdb_database_execute_view (CouchdbDatabase *database,
 	GSList *doclist = NULL;
 
 	g_return_val_if_fail (COUCHDB_IS_DATABASE (database), NULL);
+	g_return_val_if_fail (design_doc != NULL, NULL);
+	g_return_val_if_fail (view_name != NULL, NULL);
 
 	if (g_str_has_prefix (design_doc, "_design/")) {
 		url = g_strdup_printf ("%s/%s/%s/_view/%s",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]