PQflush calls pqFlush, which performs struct access to the connectionwithout checking if it's valid, resulting in a segfault if called witha null pointer.
Please find attached a patch adding a guard to PQflush().
Cheers
-- Daniele