[Greater-commits] r199 - trunk/GREAT-ER-DB/trunk/impl/postgresql
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jun 14 16:41:49 CEST 2011
Author: aheinecke
Date: 2011-06-14 16:41:48 +0200 (Tue, 14 Jun 2011)
New Revision: 199
Modified:
trunk/GREAT-ER-DB/trunk/impl/postgresql/gdagreater_pg.pgc
Log:
Do not crash if gda_db_disconnect is called with a NULL pointer
Modified: trunk/GREAT-ER-DB/trunk/impl/postgresql/gdagreater_pg.pgc
===================================================================
--- trunk/GREAT-ER-DB/trunk/impl/postgresql/gdagreater_pg.pgc 2011-06-14 14:27:51 UTC (rev 198)
+++ trunk/GREAT-ER-DB/trunk/impl/postgresql/gdagreater_pg.pgc 2011-06-14 14:41:48 UTC (rev 199)
@@ -4247,6 +4247,12 @@
/* ------------------ *
* Start of function
* ------------------ */
+
+ if(!db_con) {
+ // Since there is no connection to disconnect from
+ // we return success.
+ return(DA_SUCCESS);
+ }
#if DEBUG_MODE_ON == 1
/* debug output */
lgda_write_debug_info(1, v_module, NULL, NULL, NULL, NULL, NULL, NULL);
More information about the Greater-commits
mailing list