From 0917e064beda07fb83ad415c9f27419e36bfbe6a Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Sat, 7 Nov 2020 21:43:41 +0900 Subject: [PATCH] Fix a compilation error with vc10. --- statement.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/statement.c b/statement.c index 07e4ff8..24dee4c 100644 --- a/statement.c +++ b/statement.c @@ -1292,8 +1292,6 @@ static PG_ErrorInfo * SC_create_errorinfo(const StatementClass *self, PG_ErrorInfo *pgerror_fail_safe) { QResultClass *res = SC_get_Curres(self); - if (!res) - res = SC_get_Parsed(self); ConnectionClass *conn = SC_get_conn(self); Int4 errornum; size_t pos; @@ -1303,6 +1301,8 @@ SC_create_errorinfo(const StatementClass *self, PG_ErrorInfo *pgerror_fail_safe) char *ermsg = NULL, *sqlstate = NULL; PG_ErrorInfo *pgerror; + if (!res) + res = SC_get_Parsed(self); if (self->pgerror) return self->pgerror; errornum = self->__error_number; -- 2.39.5