Merge branch 'master' of gnunet.org:gnunet
[oweals/gnunet.git] / src / sq / sq_query_helper.c
index a04b4ced45e1d0560bc01616c44f4a5fe53597f3..94a3a3f1c868ae8d169f0f9f1ca4507e7e5ff5c9 100644 (file)
@@ -90,6 +90,14 @@ bind_string (void *cls,
              sqlite3_stmt *stmt,
              unsigned int off)
 {
+  if (NULL == data)
+  {
+    if (SQLITE_OK !=
+        sqlite3_bind_null (stmt,
+                           (int) off))
+      return GNUNET_SYSERR;
+    return GNUNET_OK;
+  }
   if (SQLITE_OK !=
       sqlite3_bind_text (stmt,
                          (int) off,