Index: src/interfaces/ecpg/ecpglib/connect.c
===================================================================
--- src/interfaces/ecpg/ecpglib/connect.c	(HEAD)
+++ src/interfaces/ecpg/ecpglib/connect.c	(ecpg-fix)
@@ -144,7 +144,7 @@
 		if (actual_connection == act)
 			actual_connection = all_connections;
 
-		ecpg_log("ecpg_finish: connection %s closed\n", act->name);
+		ecpg_log("ecpg_finish: connection %s closed\n", act->name ? act->name : "(null)");
 
 		for (cache = act->cache_head; cache; ptr = cache, cache = cache->next, ecpg_free(ptr));
 		ecpg_free(act->name);
