summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/compatlib/informix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/compatlib/informix.c')
-rw-r--r--src/interfaces/ecpg/compatlib/informix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index fdd175983e1..1e59fbc9850 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -1033,6 +1033,8 @@ void
ECPG_informix_reset_sqlca(void)
{
struct sqlca_t *sqlca = ECPGget_sqlca();
+ if (sqlca == NULL)
+ return;
memcpy((char *) sqlca, (char *) &sqlca_init, sizeof(struct sqlca_t));
}