From: Christian Grothoff Date: Mon, 24 Feb 2020 22:48:47 +0000 (+0100) Subject: do not segv if there is no postgres X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=01439e25d844b3169fa61c2527b4af5c948a2e65;p=oweals%2Fgnunet.git do not segv if there is no postgres --- diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c index 7bcb10980..b09354af8 100644 --- a/src/pq/test_pq.c +++ b/src/pq/test_pq.c @@ -238,6 +238,12 @@ main (int argc, NULL, es, NULL); + if (NULL == db) + { + fprintf (stderr, + "Cannot run test, database connection failed\n"); + return 77; + } if (CONNECTION_OK != PQstatus (db->conn)) { fprintf (stderr,